Re: [ServiceWorker] Workers & SharedWorkers within ServiceWorkers (#678)

Requests from a service worker always go to the network, which could be a gotcha here. However, you could get a script from the cache & create a blob url.

In the case of SharedWorkers, you'd have to use the name param `new SharedWorker(blobUrl, "my-shared-worker")` in both the page and the service worker to ensure the same execution context is used.

Is this acceptable?

Otherwise we have to:

* White/blacklist the types of requests that do/don't go via a service worker if the request originates from a service worker
* Figure out which service worker would get the fetch event for requests from a service worker (a SW script url may fall under the scope of a different registration)
* Make service workers show up in `clients.matchAll({ includeUncontrolled: true })`, should they become valid request clients

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

Received on Tuesday, 9 June 2015 10:03:36 UTC