https://jakearchibald.github.io/isserviceworkerready/demos/clients-count/
- Visit the above
- Hit shift + refresh
- Hit refresh
Chrome says 1, Firefox says 0.
The Firefox behaviour seems right to me, but unless I'm reading it wrong, the spec isn't clear around this. This might be because of earlier confusion around when clients are created.
From https://html.spec.whatwg.org/multipage/browsers.html#navigating-across-documents:
Set request's client to the source browsing context's active document's Window object's environment settings object
If I'm reading this correctly, the client is the window being navigated, not a new client ready for the new page.
From https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#on-fetch-request-algorithm 12.1:
If client is not a secure context, return null.
This seems to assume that the client is a new client ready for the new page, but doesn't this mean that SW will fail if you're navigating from an unrelated insecure page?
https://jakearchibald.github.io/isserviceworkerready/demos/clients-count/
Chrome says 1, Firefox says 0.
The Firefox behaviour seems right to me, but unless I'm reading it wrong, the spec isn't clear around this. This might be because of earlier confusion around when clients are created.
From https://html.spec.whatwg.org/multipage/browsers.html#navigating-across-documents:
If I'm reading this correctly, the client is the window being navigated, not a new client ready for the new page.
From https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#on-fetch-request-algorithm 12.1:
This seems to assume that the client is a new client ready for the new page, but doesn't this mean that SW will fail if you're navigating from an unrelated insecure page?