make service worker serve cache first

This commit is contained in:
marlon-erler
2024-08-02 13:55:20 +02:00
parent 5ae8f46bd9
commit 45e2c2f694
2 changed files with 20 additions and 26 deletions
+1
View File
@@ -21,6 +21,7 @@ async function registerServiceWorker() {
setTimeout(() => window.location.reload(), 500);
} else if (registration.active) {
console.log("Service worker active");
registration.update();
}
} catch (error) {
console.error(`Could not install service worker: ${error}`);