Open cdlewis opened 5 years ago
There's already a try/catch around fetch. Currently that will delete the cache. I could also send a post message to the client which will trigger an unregister, but it would re-register on next page load. I think that's a good balance.
I think it would be helpful to have the service worker attempt to unregister itself if there's a JS error. Helps stop people from shooting themselves in the foot. I'm open to taking this assuming it's possible / you agree it would be helpful.