1const CACHE_NAME = 'app-cache-v1'; 2const PRECACHE_URLS = [ 3 '/Home/Manifest', 4]; 5 6self.addEventListener('install', (event) => { 7 console.log('PWA Service Worker: Installing...'); 8 event.waitUntil( 9 caches.open(CACHE_NAME).then(function (cache) { 10 console.log('PWA Service Worker: Caching ..'); 11 return cache.addAll(PRECACHE_URLS); 12 }) 13 ); 14 self.skipWaiting(); 15}); 16 17self.addEventListener('activate', function (event) { 18 console.log('PWA Service Worker: Activated'); 19 event.waitUntil(clients.claim()); 20}); 21 22// ð¹ Always fetch pwa-notification.js fresh (bypass cache) 23self.addEventListener("fetch", (event) => { 24 if (event.request.url.includes("pwa-notification.js")) { 25 event.respondWith( 26 fetch(event.request, { cache: "no-store" }).catch(() => { 27 // fallback if offline 28 return caches.match(event.request); 29 }) 30 ); 31 } 32})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.