On 2014-12-10 3:32 PM, Jonas Sicking wrote:
On Wed, Dec 10, 2014 at 12:11 PM, <jyass...@chromium.org> wrote:
"Work with" is a bit too vague here. I think you're suggesting to change which
SW cross-origin fetch() calls are routed to. Right now,
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#on-fetch-request-algorithm
(called from https://fetch.spec.whatwg.org/#http-fetch) specifies in step 13 that
'fetch' contexts go to the client's SW, not the target URL's SW.
No, I don't think that's the proposal. As you point out that would
have several problems.
I think instead the proposal is to enable a SW from website A to say
"please consult me for any network requests to https://a.com/apis/*".
Then if website B makes a network request to
https://a.com/apis/whatnot, it would first go to B's SW as per current
SW specifications. But if that SW decides to forward the request to
the network, then rather than directly hitting the network, first go
to A's SW.
Same thing if B's SW for any other reason makes a network request to
https://a.com/apis/whatnot. Rather than directly hitting the network
as is currently defined, we'd first go to A's SW.
Yes, that is exactly what I had in mind.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform