Uppdatera 'sw.js'
This commit is contained in:
parent
0402d00ebd
commit
3e03a78078
10
sw.js
10
sw.js
@ -34,14 +34,14 @@
|
||||
});
|
||||
|
||||
/** Rensar cache */
|
||||
self.addEventListener('activate', (e) => {
|
||||
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 */
|
||||
self.addEventListener('fetch', function (event) {
|
||||
|
Loading…
Reference in New Issue
Block a user