1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-11-14 17:15:15 +01:00
portfolio/static/sw.js

15 lines
324 B
JavaScript
Raw Normal View History

self.addEventListener('install', function() {
self.skipWaiting()
})
self.addEventListener('activate', function() {
self.registration
.unregister()
.then(function() {
return self.clients.matchAll()
})
.then(function(clients) {
clients.forEach(client => client.navigate(client.url))
})
})