mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 03:37:12 -04:00
Remove deprecated cache busting code
Former-commit-id: 98ba18995a1f55a0ea07acbfe29b12ca1f3632ff [formerly ce0a239bfe9166b47b56626d6ba799aa9143cf84 [formerly 26d6f8d5e1ba7b863bc5c86f3bacc750967e69d1]] Former-commit-id: 7710aea733f4b9896dd6aebb20c2f657e2265197 Former-commit-id: 4ebd66720a6739bc5b8af6f1aa553817fadc5bd6
This commit is contained in:
parent
410f11d752
commit
dd30ec42ff
@ -105,18 +105,6 @@ self.addEventListener("install", function (event) {
|
||||
return new Request(url + '?v' + appVersion, { cache: 'no-cache' });
|
||||
});
|
||||
if (!excludedURLSchema.test(requests[0].url)) event.waitUntil(
|
||||
// caches.open(CACHE).then(function (cache) {
|
||||
// Promise.all(
|
||||
// precacheFiles.map(fucntion (url) {
|
||||
// // cache-bust using a random query string
|
||||
// return fetch(`${url}?${Math.random()}`).then((response) => {
|
||||
// // fail on 404, 500 etc
|
||||
// if (!response.ok) throw Error('Not ok');
|
||||
// return cache.put(url, response);
|
||||
// });
|
||||
// })
|
||||
// );
|
||||
// })
|
||||
caches.open(CACHE).then(function (cache) {
|
||||
console.log("[SW] Caching pages during install");
|
||||
return cache.addAll(requests).then().catch(function(err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user