Answers for "undo pwa"

0

undo pwa

if(window.navigator && navigator.serviceWorker) {
  navigator.serviceWorker.getRegistrations()
  .then(function(registrations) {
    for(let registration of registrations) {
      registration.unregister();
    }
  });
}
Posted by: Guest on December-29-2021
0

undo pwa

if ('caches' in window) {
    caches.keys()
      .then(function(keyList) {
          return Promise.all(keyList.map(function(key) {
              return caches.delete(key);
          }));
      })
}
Posted by: Guest on December-29-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language