I hate service workers for not reloading things.

master
Zed A. Shaw 4 years ago
parent 8f8db6555d
commit 1d3e9cefb7
  1. 4
      src/service-worker.js

@ -68,8 +68,8 @@ self.addEventListener('fetch', event => {
.open(`offline${timestamp}`) .open(`offline${timestamp}`)
.then(async cache => { .then(async cache => {
try { try {
const response = await fetch(event.request); const response = await fetch(event.request, {credentials: 'same-origin'});
cache.put(event.request, response.clone()); // cache.put(event.request, response.clone());
return response; return response;
} catch(err) { } catch(err) {
const response = await cache.match(event.request); const response = await cache.match(event.request);

Loading…
Cancel
Save