diff --git a/sw/service-worker.ts b/sw/service-worker.ts index 4a74881c..4f1eca54 100644 --- a/sw/service-worker.ts +++ b/sw/service-worker.ts @@ -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) {