fixing redirect caching issue for offline page happening on Chrome

This commit is contained in:
Jaime Guajardo
2019-05-20 15:49:05 -05:00
parent 5bd1cb32e2
commit f234cbe32f

View File

@@ -2,7 +2,7 @@
var staticCacheName = "django-pwa-v" + new Date().getTime();
var filesToCache = [
'/offline',
'/offline/',
'/static/css/django-pwa-app.css',
'/static/images/icons/icon-72x72.png',
'/static/images/icons/icon-96x96.png',
@@ -57,7 +57,7 @@ self.addEventListener("fetch", event => {
return response || fetch(event.request);
})
.catch(() => {
return caches.match('offline');
return caches.match('/offline/');
})
)
});
});