This commit is contained in:
syuilo 2017-12-08 14:56:10 +09:00
parent 973d446358
commit 8c70c9d6a0
5 changed files with 12 additions and 36 deletions

View file

@ -95,6 +95,10 @@
// Clear cache (serive worker)
try {
navigator.serviceWorker.controller.postMessage('clear');
navigator.serviceWorker.getRegistrations().then(registrations => {
registrations.forEach(registration => registration.unregister());
});
} catch (e) {
console.error(e);
}