0

I have code on a production server which is using an old cached version of the index.html file. The only file it tries to dynamically load is the service-worker.js which no longer exists and thus gets back a 404. Can a service-worker be re-written to force a hard reload when it is loaded?

Anshul Koka
  • 2,976
  • 1
  • 22
  • 40
  • You might want to take a look at [generic cache busting](https://stackoverflow.com/questions/49547/how-to-control-web-page-caching-across-all-browsers) – enjoylife Jul 16 '17 at 01:20
  • I have cache busting headers set now but unfortunately the old files were cached without these. The idea is to somehow rewrite the service-worker to force to browser to refresh all files. Not sure if that is even possible though. – Anshul Koka Jul 16 '17 at 14:46
  • Possible duplicate of [How can I remove a buggy service worker, or implement a "kill switch"?](https://stackoverflow.com/questions/33986976/how-can-i-remove-a-buggy-service-worker-or-implement-a-kill-switch) – Jeff Posnick Jul 17 '17 at 16:10

0 Answers0