- From: Salvador de la Puente González <notifications@github.com>
- Date: Tue, 23 Aug 2016 13:10:03 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Tuesday, 23 August 2016 20:10:42 UTC
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