feat(service-worker): add unregister script and update index.html

- Introduced a new script to unregister service workers, enhancing control over service worker lifecycle.
- Updated index.html to include the unregister script, ensuring it is loaded for proper service worker management.
This commit is contained in:
chamikaJ
2025-05-14 16:31:17 +05:30
parent faa5d26601
commit fe2518d53c
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();
}
});
}