This commit is contained in:
Drath
2023-06-28 20:16:39 +02:00
commit 7eeb201f1f
26 changed files with 627 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// we're **progressive** now
const ASSETS = [
"/resources/",
"/index.htm",
"/secrets/",
"/"
];
let cache_name = "SimiCart"; // The string used to identify our cache
self.addEventListener("install", event => {
console.log("installing...");
event.waitUntil(
caches
.open(cache_name)
.then(cache => {
return cache.addAll(assets);
})
.catch(err => console.log(err))
);
});
self.addEventListener("fetch", event => {
console.log("You fetched " + event.url);
});