Skip to content

Instantly share code, notes, and snippets.

@mrenty
Created October 27, 2017 06:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mrenty/b25227596e27b2a030878e6912422471 to your computer and use it in GitHub Desktop.
if (SERVICE_WORKER_KILL_SWITCH && 'serviceWorker' in navigator && /https/.test(location.protocol)) {
navigator.serviceWorker.getRegistrations().then(registration => {
for (let registration of registrations) {
registration.unregister();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment