partey_workadventure/front/public/service-worker-dev.js

30 lines
640 B
JavaScript
Raw Permalink Normal View History

let CACHE_NAME = 'workavdenture-cache-dev';
let urlsToCache = [
'/'
];
self.addEventListener('install', function(event) {
// Perform install steps
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => {
return cache.addAll(urlsToCache);
})
);
});
self.addEventListener('fetch', (event) => {
//never cache data will be stored in dev mode
});
self.addEventListener('wait', function(event) {
//TODO wait
});
self.addEventListener('update', function(event) {
//TODO update
});
self.addEventListener('beforeinstallprompt', (e) => {
//TODO change prompt
});