I’m building my first progressive web app, using a service worker to cache files for offline use.
My question: what happens when I need to deploy an updated version of my app? In my experiments so far, the user agent always loads the application from the service worker cache – even when the device is online.
Do I need to build some kind of check into my app? For example, at launch time, it could check a remote URL, which would return the latest version number. If the app finds that its own version number is out of date, then it would clear the service worker cache and…ask the user to reload or something?
Something like that? What’s the established pattern here?