Let's face it, we can't be perfect and there is a chance you deploy a buggy service worker you just can't replace.
Here are some ways you can handle this situation.
Read the Blog Post - https://love2dev.com/blog/how-to-unin...
Want to know more about service worker development? Enroll in my Progressive Web Application course, http://PWACourse.com, and you can become a rock star service worker developer.
Free eBook Why Upgrade to a Progressive Web App https://love2dev.com/pwaupgrade
Something is going wrong in your service worker and you just want your site to work. So while you debug the problem how do you remove the service worker from existing clients?
The service worker life cycle is a concept that often confuses developers. We often cover registering and updating service workers, but neglect how to remove a registered worker from a web site.
Not knowing how to unregister a service worker from a client can leave your site in a suspended state of failure.
And no one wants their application to deliver a poor user experience...especially from a bug.
Unless you can quickly isolate and correct the issue you may need to buy some time to work through the error.
Removing the buggy service worker might be your best, temporary solution. This should at least eliminate the cause of the issue, while allowing the site to just work.
If you create a buggy service worker you want it to be on your local development machine, using a localhost web server. Unless you are a perfect developer you will encounter moments where your service worker is severely broken and may not update the way you want. Fortunately, when working locally you can control service worker registration through the developer tools
Get social with Love2Dev on:
Facebook: / love2dev
Twitter: / chrislove
G+: https://plus.google.com/b/11090410738...
Linkedin: / love2dev
Pinterest: / docluv