Created
January 8, 2022 08:45
-
-
Save dikaio/292d93c64e2144a29b28dc499aa9d4b1 to your computer and use it in GitHub Desktop.
Unregister Service Worker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
navigator.serviceWorker.getRegistrations().then(function (registrations) { | |
for (const registration of registrations) { | |
registration.unregister() | |
} | |
}) | |
if (window.navigator && navigator.serviceWorker) { | |
navigator.serviceWorker.getRegistrations().then(function (registrations) { | |
for (const registration of registrations) { | |
registration.unregister() | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment