Re: [w3c/ServiceWorker] Eliminating SW startup latency for common case (#920)

I though this option would be per route. If this is the case and trying to anticipate other kind of scenarios, what about a `NetworkRace` type and something like:

```js
navigator.serviceWorker.register('sw.js', {
  routes: {
    'some/route': new NetworkRace(),
    'some/other/route': new NetworkRace({ headers: ..., tttl: ... })
  }
});
```

Handling the fetch event, we can use something like:

```js
self.onfetch = evt => {
  doThingsWith(evt.networkResponse);
};
```

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

Received on Tuesday, 23 August 2016 20:10:42 UTC