- From: Inian <notifications@github.com>
- Date: Fri, 14 Oct 2016 02:43:26 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Friday, 14 October 2016 09:43:52 UTC
@lmj0011 This is what I came up with
```
self.addEventListener("fetch", function(e) {
if (e.clientId) {
clients
.get(e.clientId)
.then((client) => {
if(client.url == "page1.html" || client.url == "page2.html") {
// respond to fetch request
} else {
// pass through
e.respondWith(fetch(e.requestURL));
}
});
} else {
// pass through for navigation request
e.respondWith(fetch(e.requestURL));
}
});
```
--
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/985#issuecomment-253755588
Received on Friday, 14 October 2016 09:43:52 UTC