You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// window code with SW controlling `/in/`varw=newWorker('/in/worker.js');// sw.js scriptaddEventListener('fetch'evt=>{if(evt.request.url.includes('/in/worker.js')){return;}});// Server redirects `/in/worker.js` to `/out/worker.js` which is not covered
What should the final worker's self.navigator.serviceWorker.controller be set to?
My read of the spec is that it should be set to the /in/ scope service worker, even though the final script load is out-of-scope:
Handle Fetch step 12.6 sets the active service worker
HTTP Fetch step 4.2 sets the service-worker mode to none because worker scripts use follow redirect mode.
Also consider the case where it redirects to a scope controlled by a different service worker. It would still be controlled by the first service worker.
This seems weird and unexpected to me. Should we fix it? Or am I just confused?
The text was updated successfully, but these errors were encountered:
Note, the same-origin redirect also means the reserved client is preserved across the redirect. So we don't get the active service worker cleared that way.
Consider this situation:
What should the final worker's
self.navigator.serviceWorker.controller
be set to?My read of the spec is that it should be set to the
/in/
scope service worker, even though the final script load is out-of-scope:none
because worker scripts usefollow
redirect mode.Also consider the case where it redirects to a scope controlled by a different service worker. It would still be controlled by the first service worker.
This seems weird and unexpected to me. Should we fix it? Or am I just confused?
The text was updated successfully, but these errors were encountered: