Select Git revision
serviceWorker.min.js
-
Conrad Zelck authored
Source: https://www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript Inludes pwa caching. Signed-off-by:
Conrad Zelck <git@simpel.cc>
Conrad Zelck authoredSource: https://www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript Inludes pwa caching. Signed-off-by:
Conrad Zelck <git@simpel.cc>
serviceWorker.min.js 372 B
const staticFreqBuddy="freq-buddy-site-v1",assets=["/index.php","/script.min.js","/app.min.js","/style.min.css","/Simpel_256px_eco.webp","/github.svg"];self.addEventListener("install",(e=>{e.waitUntil(caches.open(staticFreqBuddy).then((e=>{e.addAll(assets)})))})),self.addEventListener("fetch",(e=>{e.respondWith(caches.match(e.request).then((s=>s||fetch(e.request))))}));