Skip to content

Instantly share code, notes, and snippets.

@gauravmuk
Created September 17, 2020 03:03
Show Gist options
  • Save gauravmuk/c088f616b477fb0e9bbf50c7f07b7f19 to your computer and use it in GitHub Desktop.
Save gauravmuk/c088f616b477fb0e9bbf50c7f07b7f19 to your computer and use it in GitHub Desktop.
Remove Service Worker
navigator.serviceWorker
.getRegistrations()
.then(function (registrations) {
for (let registration of registrations) {
registration.unregister();
}
})
.catch(function (err) {
console.log("Service Worker registration failed: ", err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment