Re: [w3c/ServiceWorker] Is there any way for a web page to see if their requests will be intercepted by a foreign fetch handler? (#1092)

Not currently, no. You could poll for the presence of a (cooperating) foreign fetch handler by fetching some resource where you have some way of identifying if the request was intercepted or not (foreign fetch handler adding custom header, or just specific content/URL), but there isn't currently any way to wait for the presence of the CDN SW.

You should always be able to deal with the foreign fetch handler not being present though. Even if you somehow determine that at time X there was a foreign fetch handler that gives no guarantees that the handler will still be there for future requests.

The closest to what you're asking for is something like what's discussed in whatwg/fetch#492, providing some way to specify that certain fetches should or should not be served by a service worker.

-- 
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/1092#issuecomment-290246859

Received on Wednesday, 29 March 2017 22:34:11 UTC