init
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Self-destruct all the old sw.js workers
|
||||
*/
|
||||
|
||||
self.addEventListener('install', function (e) {
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener('activate', function (e) {
|
||||
self.registration.unregister()
|
||||
.then(function () {
|
||||
return self.clients.matchAll();
|
||||
})
|
||||
.then(function (clients) {
|
||||
clients.forEach(client => client.navigate(client.url))
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user