Re: [ServiceWorker] What is FetchEvent.clientId for navigation requests (#808)

> The reason why I disagree with this spec change is that if a developer actually needs the clientId for the top-level document, we're making them go through unnecessary hoops, since this change will force them to get the clientId out of a subsequent fetch and/or Clients.matchAll()

On the other hand, the Mozilla behaviour makes it really tricky to know when a client has gone. With the current spec, `clients.get(clientId)` returning null means the client has gone, so its data can be removed from databases etc. In the Mozilla behaviour, if null is returned the client may have expired, isn't yet created, or may never be created. I'm a little worried about this.

Maybe we should have a new property for what Mozilla does now? Something like `reservedClientId` or `potentialClientId`? This would be handy during navigations, as you get to link together the origin client and the new client.

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

Received on Thursday, 7 January 2016 10:38:34 UTC