From f71afe78e4ee67c6cbf51b9043ed3b56d1acf5d6 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sat, 24 Sep 2016 14:03:57 +0100 Subject: [PATCH] Store node pages for offline use --- public/sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sw.js b/public/sw.js index 9e1cbc2..b6915cb 100644 --- a/public/sw.js +++ b/public/sw.js @@ -54,7 +54,7 @@ self.addEventListener('fetch', function(event) { // Cache the response for certain pages .then(function(response) { - if(requestUrl.pathname === '/') { + if(requestUrl.pathname === '/' || requestUrl.pathname.startsWith('/node/')) { caches.open(cacheName).then(function(cache) { // Modify the response html so we know when it was cached