From e7e0ec78ffae4420eeca3cb3b903eee5bd53cba4 Mon Sep 17 00:00:00 2001 From: Sami JABER Date: Tue, 21 Jan 2025 10:51:55 +0100 Subject: [PATCH] Add SW Information --- services/webapp/src/serviceWorkerRegistration.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/webapp/src/serviceWorkerRegistration.ts b/services/webapp/src/serviceWorkerRegistration.ts index fb16c37..ca60dff 100644 --- a/services/webapp/src/serviceWorkerRegistration.ts +++ b/services/webapp/src/serviceWorkerRegistration.ts @@ -71,6 +71,7 @@ function registerValidSW(swUrl: string, config?: Config) { .register(swUrl) .then(registration => { registration.onupdatefound = () => { + console.log('On Update Found executed, lets handle '); if (registration.waiting) { console.log('New service worker is waiting, skipping ......'); registration.waiting.postMessage({ type: 'SKIP_WAITING' }); @@ -80,6 +81,7 @@ function registerValidSW(swUrl: string, config?: Config) { return; } installingWorker.onstatechange = () => { + console.log('OnStage changed ' + installingWorker.state); if (installingWorker.state === 'installed') { if (navigator.serviceWorker.controller) { // At this point, the updated precached content has been fetched,