diff options
-rw-r--r-- | sw.js | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -24,20 +24,23 @@ return cache.addAll([ ]); +}) -.then(() => self.skipWaiting()); - }) - ) -}); +); -self.addEventListener('activate', event => { - event.waitUntil(self.clients.claim()); }); +self.addEventListener('fetch', function(event) { + +console.log(event.request.url); + +event.respondWith( + +caches.match(event.request).then(function(response) { + +return response || fetch(event.request); + +}) + +); -self.addEventListener('fetch', event => { - event.respondWith( - caches.match(event.request, {ignoreSearch:true}).then(response => { - return response || fetch(event.request); - }) - ); }); |