Re: [w3c/ServiceWorker] Should we expose reserved clients? (#1216)

> Are there cases where we don't even create a global? We definitely know when a response can't form a client, or when it's redirected cross-origin, so we can resolve null then.

But, the service worker gets the `FetchEvent.reservedId` before its `FetchEvent.respondWith()` or fall-through possibly triggers the cross-origin redirect.

I think per the current spec we are always supposed to have a reserved Client even if the browser is "optimizing" by delaying the creation of the global.  For example, right now firefox avoids creating the initial about:blank window global when it can, but I still pre-allocate a reserved Client ID for it.

-- 
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/1216#issuecomment-339706111

Received on Thursday, 26 October 2017 15:34:53 UTC