Re: [ServiceWorker] unregister() in service worker navigation fetch event (#804)

> Once a fetch event is dispatched to the service worker in the example, that means the client got a controller for this fetch already. If there was no matching registration or registration's active worker, it should have hit the network.

I guess I am talking about this scenario:

1) https://example.com/index.html calls register('foo/sw.js') which results in a registration with scope https://example.com/foo/
2) https://example.com/foo/index.html is opened in a new tab
3) A FetchEvent for foo/index.html is fired

At point 3 there are no loaded documents under foo/ yet.

Are you referring to this test after 12.5 in Handle Fetch?

> Note: From this point, the service worker client starts to use its active worker's containing service worker registration.

Would the unloaded (about:blank?) document in the client at this point start returning the service worker for navigator.serviceWorker.controller even before its initial network load is handled by the service worker?

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/804#issuecomment-169351911

Received on Wednesday, 6 January 2016 15:19:09 UTC