From 9b1ec8164702b0c37ab56ccb7f2bf0537a2bddac Mon Sep 17 00:00:00 2001 From: khondokartowsif171 Date: Sat, 5 Sep 2026 06:18:42 +0600 Subject: [PATCH] fix(pwa): force service worker update v8 and auto-reload on fresh deploy --- index.html | 16 ++++++++++++++-- sw.js | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 98c62d0..877d98d 100644 --- a/index.html +++ b/index.html @@ -1052,11 +1052,23 @@ Format with clear bullet points, emojis, and a call-to-action. - + diff --git a/sw.js b/sw.js index 5abbd08..0c6eaf4 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'opal-ai-v5-cache'; +const CACHE_NAME = 'opal-ai-v8-cache'; self.addEventListener('install', (e) => { self.skipWaiting(); @@ -15,6 +15,7 @@ self.addEventListener('activate', (e) => { }); self.addEventListener('fetch', (e) => { + // Always fetch fresh network first, fallback to cache only if completely offline e.respondWith( fetch(e.request).catch(() => caches.match(e.request)) );