Improved service worker for imports

This commit is contained in:
Eduard Urbach 2017-11-30 03:27:38 +01:00
parent f358ffbf7c
commit 55adb9adef

View File

@ -163,7 +163,18 @@ class MyServiceWorker {
// If the user requests a sub-page we should prefetch the full page, too.
if(url.includes("/_/") && !url.includes("/_/search/")) {
this.prefetchFullPage(url)
var prefetch = true
for(let pattern of EXCLUDECACHE.keys()) {
if(url.includes(pattern)) {
prefetch = false
break
}
}
if(prefetch) {
this.prefetchFullPage(url)
}
}
if(!refresh || !servedETag) {