Uppdatera 'sw.js'

This commit is contained in:
Henrik Bygren 2022-06-07 14:53:17 +00:00
parent 0402d00ebd
commit 3e03a78078

6
sw.js
View File

@ -36,11 +36,11 @@
/** Rensar cache */
self.addEventListener('activate', (e) => {
e.waitUntil(caches.keys().then((keyList) => {
Promise.all(keyList.map((key) => {
return Promise.all(keyList.map((key) => {
if (key === cacheKey) { return; }
caches.delete(key);
return caches.delete(key);
}))
})());
}));
});
/** cache-filer först, upddaterar cache från servern */