This commit is contained in:
remi 2022-06-19 11:04:43 +02:00
parent 30b3cf0d0a
commit a6542fbe60
2 changed files with 7 additions and 3 deletions

View File

@ -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()
registration.unregister();
}}); //dev use only!! or whatever... i just copypasted this from SO
}

2
sw.js
View File

@ -1,4 +1,4 @@
const currentVersion = '20267';
const currentVersion = '2909';
const addResourcesToCache = async (resources) => {
const cache = await caches.open(currentVersion);