Re: [w3c/ServiceWorker] SharedWorker script interception after redirects (#1289)

>The spec says:
>
> 1.    The initial request gets intercepted. Once any redirect comes from network (as opposed to from a service worker), that redirect and subsequent redirects are not intercepted.

I guess this is mostly true, but I'm not sure "from network" is the main determinant.  The spec says to bypass the service worker on any redirect if the service worker does not call `respondWith()`.  So its really if the service worker does a "fall back" operation that results in a redirect vs performing its own fetch() that somehow produces a redirect.

> 2.   The final service worker that gets a fetch event (or would have, in the case of a non-fetch event worker) becomes the controller of the resulting service worker client.

Agree.

>Assuming network redirects only, that means the spec says:
>
> 1.    Only the initial request gets intercepted.
> 2.    The initial request URL is used to determine the controller.

I think you have to assume a fall back service worker that does not call respondWith() for this part to be true.  If the service worker converts the request to manual or does something else that produces a Response via respondWith() then I don't think these statements hold.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1289#issuecomment-375174051

Received on Thursday, 22 March 2018 04:12:30 UTC