- From: Erik Witt <notifications@github.com>
- Date: Fri, 07 Nov 2025 03:22:01 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 7 November 2025 11:22:04 UTC
ErikWitt created an issue (w3c/ServiceWorker#1803) For navigate requests the `sec-fetch-dest` header is set to `document`. Once a service worker is introduced that simply forwards the request to the network, the `sec-fetch-dest` header changes to `empty`. There are systems that rely on that header on server side to detect navigate requests and act accordingly. Shopify for example has some language/currency persistence logic that uses it. Introducing a service worker that forwards requests (e.g. to cache responses for offline handling), breaks functionality. I would argue that a navigate request from the browser should behave the same when proxied through a service worker. If this cannot be assumed by the developer, it gets very hard to implement service worker without potentially breaking functionality. To have a reproducable example, here is a test website: https://dm-clone-optimized.app.baqend.com/fetch-dest/ It installs a service worker and when reloading you can see the `sec-fetch-dest` header being different depending on whether you bypass the service worker or not. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1803 You are receiving this because you are subscribed to this thread. Message ID: <w3c/ServiceWorker/issues/1803@github.com>
Received on Friday, 7 November 2025 11:22:04 UTC