Re: [w3c/ServiceWorker] reserved Client objects and redirected navigations (#1031)

> 1. A SW's scope does not matter, right?

In the option 1, the scope apparently doesn't matter as only the final client will survive and the other clients created for redirects won't get the actual global object. But in the option 2 and 3, the same client is reused for redirects. (e.g. the case in https://github.com/w3c/ServiceWorker/issues/1031#issuecomment-268183526.) So, the messages sent from multiple (same-origin) SWs with different scopes will be delivered to the same ServiceWorkerContainer object. Not sure if it's an expected behavior. I didn't think it'd be but not really sure.

> 2. Same-origin -> cross -> same, needs to be three clients I think. Seems easy to open up a side channel otherwise.

This opens up two possibilities. It can creates three clients as you suggested, and the final client will survive, being associated with the actual global object. Or it can use two clients for different origins, in which case we might retain the message from the same-origin SW before it redirected to cross-origin resource. (For this, we'll need to track the redirects to queue only the messages from the same-origin SWs to the original request's url.)

-- 
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/1031#issuecomment-268744166

Received on Thursday, 22 December 2016 08:17:08 UTC