/** * 06-03 (D-5). The emergency exit for a worker that stops the page from * booting. A `REMOVE_REGISTRATION` release writes this as `service-worker.js`. * The browser's own update check (navigation, `updateViaCache: "none"`) then * installs it over any worker of this scope without a page: it skips waiting, * and on activation unregisters the registration. It has no fetch handler, so * every request goes to the network. Owned caches stay for the * `PURGE_OWNED_RESOURCES` release, as with the page-side removal. */ export const SELF_UNREGISTERING_SERVICE_WORKER = `// Generated by scripts/build-frontend.ts (REMOVE_REGISTRATION). self.addEventListener("install", (event) => { event.waitUntil(self.skipWaiting()); }); self.addEventListener("activate", (event) => { event.waitUntil(self.registration.unregister()); }); `;