debugging service workers sucks it seems
This commit is contained in:
parent
ac458355af
commit
5425303925
2 changed files with 3 additions and 0 deletions
2
TODO
2
TODO
|
@ -1,3 +1,5 @@
|
|||
- get demo working on chrome
|
||||
- make demo use class or attr instead of checkbox
|
||||
- add button to save articles for offline reading
|
||||
- post jump points and table of contents (be wary of having this take up too much space on mobile) probably done with position: sticky in some way
|
||||
- refer to implementation here https://blog.kizu.dev/repetition-and-attribution/
|
||||
|
|
|
@ -29,6 +29,7 @@ async function fetchResponse(event) {
|
|||
//self.addEventListener('activate', (event) => event.waitUntil(self.clients.claim()));
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
console.log("Fetch:", fetch.request.url);
|
||||
if (!event.request.url.endsWith(".html") || event.request.url.indexOf(".") !== -1) return;
|
||||
//https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith
|
||||
event.respondWith(fetchResponse(event));
|
||||
|
|
Loading…
Reference in a new issue