fix: add script to unregister old service worker

The browser was still trying to load the deleted service worker file,
causing errors. Added a script that runs on page load to unregister
any existing service worker registrations.

This ensures a clean slate after removing PWA functionality.
This commit is contained in:
2026-02-20 01:08:59 -08:00
committed by Naomi Carrigan
parent 009a68a0d2
commit cce520598d
+10
View File
@@ -20,6 +20,16 @@
});
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3569924701890974" crossorigin="anonymous"></script>
<script>
// Unregister any existing service workers
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();
}
});
}
</script>
</head>
<body>
<app-root></app-root>