From 2e25e5a1ce62d7153c84bba89ffb0893054f2665 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 22 Apr 2020 14:28:56 +0300 Subject: force-return read.html from cache if failed --- worker.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worker.js b/worker.js index a2b9f59..9791d8d 100644 --- a/worker.js +++ b/worker.js @@ -133,6 +133,8 @@ this.addEventListener('fetch', function(event) { }).catch(function() { if (req.url[req.url.length-1] == "/" || req.url.match("index.php")) { return caches.match("offline.html"); + } else if (req.url.match("read.html")) { + return caches.match("read.html"); } else { return caches.match(req.url); } -- cgit v1.2.3