const CACHE = "pwabuilder-offline"; importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'); self.addEventListener("message", function(event){ if (event.data?.type === "SKIP_WAITING") { self.skipWaiting(); } }); workbox.routing.registerRoute( new RegExp('/*'), new workbox.strategies.StaleWhileRevalidate({ cacheName: CACHE }) );