User-friendly error on redundant service worker registration #32
Labels
need/analysis
Needs further analysis before proceeding
status/blocked
Unable to be worked further until needs are met
Milestone
Problem
What happens when service worker gateway is used to load website which has own service worker code?
IIUC if the scope of the new service worker is the same as or a subset of the scope of the existing service worker, the new service worker will not be able to take control until the existing service worker is unregistered or its scope is changed.
AFAIK attempting to register a service worker with a conflicting scope won't result in an error, but it won't replace the existing service worker either, creating situation which is hell to debug and reason about.
Solution
navigator.serviceWorker
registration involves sending HTTP request for worker code with `Service-Worker: script" headerHTTP 501 Not Implemented
with human-readable error, or at least link to this issue.The text was updated successfully, but these errors were encountered: