Hi,
So I’m trying to figure out this service worker thing for a PWA. It works great at caching the resources, however they never get updated, so I’m running on an old version of the app all the time (Unless I open developer tools and remove the service worker, then reload and install another one).
I’ve read some documentation here and there about them, but I haven’t found anything very concrete.
I’m just using the default service-worker.js bundled with the Ionic2 Starter as a guide.
So I guess my first question is how to I update the resources that are precached?. The main.js, main.css, polyfill.js, index.html etc.
Can the service worker just check for updates in the background for these and notify me somehow?
Also the link to the sw-toolbox documentation in the base app is incorrect https://googlechrome.github.io/sw-toolbox/docs/master/index.html found here https://github.com/driftyco/ionic2-app-base/blob/master/src/service-worker.js
Any help would be appreciated or pointers to good documentation.
I have to say, the precaching does seem to speed the load time of the PWA, it just starts right up! and on desktop it is near instant…
What would be ideal is if the resources were updated in the background, then the user got a notice to update?