Re: [ServiceWorker] A header-based SW installation (#685)

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/685#issuecomment-95174920

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