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:
7
worklenz-frontend/public/unregister-sw.js
Normal file
7
worklenz-frontend/public/unregister-sw.js
Normal file
@@ -0,0 +1,7 @@
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.getRegistrations().then(function(registrations) {
|
||||
for(let registration of registrations) {
|
||||
registration.unregister();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user