Re: [slightlyoff/ServiceWorker] Enabling multiple Service Workers for a single scope (#921)

> How can AwesomeCDN register its SW so that it would play well with example.com's SW and make sure that it still sees non-Flofli traffic? How can it make sure that its SW sees requests as they were modified by example.com's SW? That it doesn't see requests that got respondWith() by example.com's SW?

If AwesomeCDN is on a different origin, you could use foreign fetch for this.  example.com's SW runs as normal.  An incoming requests to AwesomeCDN origin trigger a ForeignFetchEvent in their SW.  This will show the request coming out of example.com's SW and can return a modified Response back to example.com.

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

Received on Thursday, 30 June 2016 15:36:08 UTC