Description
As I mentioned in my other thread comment the way I read the explainer is the platform will be ignorant of updates unless the manifest file bits are changed.
I rarely update this file.
But I periodically check for updates to cached assets in my service worker. The service worker code does not change, well rarely changes. But it just checks the server for updates.
It seems like it would be cleaner to have an update API method exposed in the service worker to trigger this process.
I know there is a periodic sync API being batted around somewhere. But basically my mechanism is more a less a customer polyfil to that mechanism.
I have more than one pattern I use for updates, depends on the app. They are generally something like this:
- generate a file manfiest (part of server render processing) with file hashes
- generate a file manfiest (part of server render processing) with last update timestamps
- make HEAD request and compare locally cached time to server last modified times.
The manifest file approaches are similar to the concept in the explainer.
I would not go with an RSS feed per se because you have many other resource types. I prefer JSON for this as it is much cleaner. But you then get into needing server-side tooling, etc. The HEAD request is very clean and something I started doing a few months ago.