comment out detectSWUpdate

This commit is contained in:
MuslemRahimi 2024-12-11 10:33:31 +01:00
parent 6d4ceb21bd
commit bc8c5cd7f0

View File

@ -110,6 +110,7 @@
}
//Check Service Worker (SW)
/*
async function detectSWUpdate() {
try {
const registration = await navigator.serviceWorker.ready;
@ -133,6 +134,7 @@
console.error("Service Worker registration failed:", error);
}
}
*/
const loadWorker = async () => {
if ("serviceWorker" in navigator) {
@ -177,10 +179,11 @@
if ($showCookieConsent === true) {
Cookie = (await import("$lib/components/Cookie.svelte")).default;
}
/*
if (window?.innerWidth <= 768) {
await detectSWUpdate();
}
*/
// Clear all the cache every 20 min
const interval = setInterval(