diff --git a/public/service-worker.js b/public/service-worker.js index 2926574..9398ea6 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,8 +1,6 @@ // public/service-worker.js -const CACHE_NAME = 'sociowire-v3'; +const CACHE_NAME = 'sociowire-v4'; const PRECACHE = [ - '/', - '/index.html', '/icons/icon-192x192.png', '/icons/icon-512x512.png', '/icons/apple-touch-icon.png', @@ -36,12 +34,7 @@ self.addEventListener('fetch', event => { if (event.request.mode === 'navigate') { event.respondWith( fetch(event.request) - .then(response => { - const copy = response.clone(); - caches.open(CACHE_NAME).then(cache => cache.put('/index.html', copy)); - return response; - }) - .catch(() => caches.match('/index.html')) + .catch(() => caches.match('/')) ); return; }