Re: [ServiceWorker] Interception of the fallback requests initiated from a SW for cross-origin resources (#684)

You could have:

```js
// https://foo/sw.js
self.oninstall = event => {
  event.waitUntil(
    event.registerExternal('//font-service/sw.js')
  );
};
```

`//font-service/sw.js` would require a `Service-Worker-Scope` header, which would be the scope on `//font-service` that it would be registered to.

```js
// https://font-service/sw.js
self.oninstall = event => {
  event.handleFallThroughRequests(['/resources', '/font']);
  // …
};
```

URLs passed to `handleFallThroughRequests` must be within the SW's scope.

My questions/concerns about this model:

* The number of workers that may be needed to handle requests to a single page - is this a problem?
* How/when will `//font-service/sw.js` be checked for updates?

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

Received on Wednesday, 22 April 2015 13:21:57 UTC