Merge pull request #15 from jamesmgg/fix-14

fixing redirect caching issue for offline page happening on Chrome
This commit is contained in:
Silvio Luis
2019-05-20 18:24:14 -03:00
committed by GitHub

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/');
})
)
});
});