diff --git a/app.js b/app.js index 420c1163..87da26e8 100644 --- a/app.js +++ b/app.js @@ -298,14 +298,14 @@ addWhatappEventHandler(); // service worker -// if('serviceWorker' in navigator){ -// window.addEventListener('load', () => { -// navigator.serviceWorker.register('/sw.js') -// .then( (reg)=>{ -// console.log('service worker registered', reg) -// }) -// .catch((err)=> console.log('Service worker not registered', err)); -// }); +if('serviceWorker' in navigator){ + window.addEventListener('load', () => { + navigator.serviceWorker.register('/sw.js') + .then( (reg)=>{ + console.log('service worker registered', reg) + }) + .catch((err)=> console.log('Service worker not registered', err)); + }); -// } +} diff --git a/sw.js b/sw.js index e1140aae..a08910de 100644 --- a/sw.js +++ b/sw.js @@ -1,7 +1,7 @@ // #5 -const staticCacheName = 'site-static-v53'; -const dynamicCache = 'site-dynamic-v53'; +const staticCacheName = 'site-static-v54'; +const dynamicCache = 'site-dynamic-v54'; const dynamicCacheSize = 30;