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