This commit is contained in:
payacom
2026-09-09 10:19:27 +03:30
parent bf41ad4e0f
commit 2d5505065b
28 changed files with 872 additions and 88 deletions

View File

@@ -43,10 +43,11 @@ self.addEventListener("notificationclick", (event) => {
);
});
const CACHE_NAME = "pwa-cache-v11";
const CACHE_NAME = "pwa-cache-v12";
const PRECACHE_URLS = [
"/",
"/offline.html",
"/manifest.webmanifest",
"/manifest.json",
"/images/icons/192x192.png",
@@ -82,7 +83,9 @@ self.addEventListener("fetch", (event) => {
const url = new URL(event.request.url);
if (event.request.mode === "navigate") {
event.respondWith(fetch(event.request));
event.respondWith(
fetch(event.request).catch(() => caches.match("/offline.html"))
);
return;
}