Edit ServiceWorker for DEV

sortierung
Samuel Zielke 1 year ago
parent faf738bce2
commit 07c88d9164

@ -2,16 +2,16 @@ var staticCacheName = "django-pwa-v" + new Date().getTime();
var filesToCache = [
'/app/home',
];
self.addEventListener("install", event => {
this.skipWaiting();
event.waitUntil(
caches.open(staticCacheName)
.then(cache => {
return fetch('/app/home')
.then(response => cache.put('/app/home', new Response(response.body)));
})
)
});
// self.addEventListener("install", event => {
// this.skipWaiting();
// event.waitUntil(
// caches.open(staticCacheName)
// .then(cache => {
// return fetch('/app/home')
// .then(response => cache.put('/app/home', new Response(response.body)));
// })
// )
// });
// Clear cache on activate
self.addEventListener('activate', event => {

Loading…
Cancel
Save

Powered by TurnKey Linux.