3

I am implementing service worker caching of my static js app. Everything works fine but to notify a user that is using the app that there is a new version available I need to be sure that I update the service worker file so the hash of it will be different and the browser will installing the new one.

Once installed I can show a notification to the user that a new version of the app is available and invite him to update it. My fear is to forget to edit the service worker file and leave the users with an outdated app until someone notice it.

Is there a good practice to automate this process? (updating service worker file on everybuild). Maybe using webpack?

ciaoben
  • 3,138
  • 4
  • 27
  • 42

0 Answers0