self.addEventListener('fetch', function(event) { event.respondWith( fetch(event.request).catch(function(e) { return caches.open(cacheName).then(function(cache) { return cache.match(event.request, {'ignoreSearch': true}).then(response => response); }); })); });
this function never actually checks for if the item exists in the cache so if it doesn't it just errors out instead of trying to run the request
self.addEventListener('fetch', function(event) { event.respondWith( fetch(event.request).catch(function(e) { return caches.open(cacheName).then(function(cache) { return cache.match(event.request, {'ignoreSearch': true}).then(response => response); }); })); });this function never actually checks for if the item exists in the cache so if it doesn't it just errors out instead of trying to run the request