Re: [w3c/ServiceWorker] Add a Service-Worker-Exclude Header (Issue #1690)

Just to clarify, `Service-Worker-Exclude` is the response header that is added to the response of the service worker script resource, right?

Conceptually we have two options I think. Making some resources out of SW control 1) at the scope level or 2) via Static Routing API.

In each option, we have to store the information that this resource is excluded somewhere e.g. database, and use it in the next navigation. So essentially those are not so different I guess.

IMHO, I feel it's better not to expose the header to exclude some paths in order to keep the API simple. Unlike `Service-Worker-Allowed`, `Service-Worker-Exclude` defines the scope by itself. But the scope is defined in the client side JavaScript now. The header based scope definition may bring new complexity.

I'm inclined to 1 or 2, but 2 sounds more easier to achieve because this can be achieved as the extension of the existing static routing infra from both standardization and implementation wise.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1690#issuecomment-2617423724
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1690/2617423724@github.com>

Received on Tuesday, 28 January 2025 01:27:10 UTC