Re: [ServiceWorker] Foreign fetch (#751)

> @@ -3589,6 +3632,148 @@ <h2 id="status">Status of This Document</h2>
>      </spec-algorithm>
>    </spec-section>
>  
> +  <spec-section id="foreign-fetch-scope-match-algorithm">
> +    <h1>Match Service Worker for Foreign Fetch</h1>

> This way foreign fetch interception is strictly subsidiary to same-origin fetch interception interception and it's always trivial to share handler logic for requests

Agreed. I think using Match Service Worker Registration in Match Service Worker for Foreign Fetch to organize the relationship of those multiple registrations makes good sense. So the behavior in the example will be like the following, right?

> Do cross origin resource requests to "/subscope/foo/bar" get intercepted by SW1?

No. It'll just fallback to the network again when returning to fetch.

> SW2 now registers for foreign fetch with scope "/subscope/"
> Now which worker gets to handle foreign fetch events for "/subscope/foo/bar"?

SW2 will do.

>A new version of SW1 now registers for foreign fetch with scope "/subscope/foo"
> Now where do foreign fetch events for "/subscope/foo/bar" go?

SW1 will still do.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/pull/751/files#r40403089

Received on Friday, 25 September 2015 06:38:33 UTC