From a6542fbe60bf62e1049c3b190e2c207109a12c7a Mon Sep 17 00:00:00 2001 From: remi Date: Sun, 19 Jun 2022 11:04:43 +0200 Subject: [PATCH] hhh --- main.js | 8 ++++++-- sw.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index d14d049..4ae9c2b 100644 --- a/main.js +++ b/main.js @@ -513,9 +513,13 @@ async function registerSW() { } function removeSW() { + caches.keys().then(function(names) { + for (let name of names) + caches.delete(name); + }); //this doesnt actually seem to work :/ but . i'll leave it in for later fixing navigator.serviceWorker.getRegistrations().then(function(registrations) { - for(let registration of registrations) { - registration.unregister() + for (let registration of registrations) { + registration.unregister(); }}); //dev use only!! or whatever... i just copypasted this from SO } diff --git a/sw.js b/sw.js index 5d2b1ac..f7743f7 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const currentVersion = '20267'; +const currentVersion = '2909'; const addResourcesToCache = async (resources) => { const cache = await caches.open(currentVersion);