fixing redirect caching issue for offline page happening on Chrome
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
var staticCacheName = "django-pwa-v" + new Date().getTime();
|
var staticCacheName = "django-pwa-v" + new Date().getTime();
|
||||||
var filesToCache = [
|
var filesToCache = [
|
||||||
'/offline',
|
'/offline/',
|
||||||
'/static/css/django-pwa-app.css',
|
'/static/css/django-pwa-app.css',
|
||||||
'/static/images/icons/icon-72x72.png',
|
'/static/images/icons/icon-72x72.png',
|
||||||
'/static/images/icons/icon-96x96.png',
|
'/static/images/icons/icon-96x96.png',
|
||||||
@@ -57,7 +57,7 @@ self.addEventListener("fetch", event => {
|
|||||||
return response || fetch(event.request);
|
return response || fetch(event.request);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
return caches.match('offline');
|
return caches.match('/offline/');
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user