[ServiceWorker] if service-worker-allowed header changes should active worker be potentially unregistered? (#857)

Consider the case where we have an existing service worker installed and active at `/app/sw.js`.

An update is then triggered which downloads the `/app/sw.js` again, but now the server has started serving a `Service-Worker-Allowed: disableallserviceworkers` header.  This value is a bit arbitrary such that it won't match any valid scope.

The Update algorithm will now start rejecting with a SecurityError, but the current existing service worker is still installed.

Should the installed service worker be unregistered if the Service-Worker-Allowed header changes such that its script is no longer valid?  Or should we allow a unique string to be recognized there to force an uninstall?

Sorry if there is already an issue on this.  I seem to recall that a "kill switch" has been discussed in the past.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/857

Received on Friday, 25 March 2016 20:11:09 UTC