Created
June 20, 2023 06:50
-
-
Save YonatanKra/2e69cdd031efb8dbd39f6f9d58ed62fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function removeOldCache(event) { | |
await caches.keys().then(function (keys) { | |
return Promise.all(keys.filter(function (key) { | |
return key !== VERSION; | |
}).map(function (key) { | |
return caches.delete(key); | |
})); | |
}).then(function () { | |
return self.clients.claim(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment