1// This is the service worker with the combined offline experience (Offline page + Offline copy of pages) 2 3// Add this below content to your HTML page, or add the js file to your page at the very top to register service worker 4 5// Check compatibility for the browser we're running this in 6if ("serviceWorker" in navigator) { 7 if (navigator.serviceWorker.controller) { 8 console.log("[PWA Builder] active service worker found, no need to register"); 9 } else { 10 // Register the service worker 11 navigator.serviceWorker 12 .register("/pwabuilder-sw.js", { 13 scope: "./" 14 }) 15 .then(function (reg) { 16 console.log("[PWA Builder] Service worker has been registered for scope: " + reg.scope); 17 }); 18 } 19}
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.