diff --git a/public/sw.js b/public/sw.js index ebbc869..5a0a784 100644 --- a/public/sw.js +++ b/public/sw.js @@ -51,7 +51,9 @@ self.addEventListener("activate", function (event) { // }) // .catch(() => { // return caches.open(CACHE_STATIC_NAME).then((cache) => { -// return cache.match("/offline.html"); +// if (event.request.headers.get("accept").includes("text/html")) { +// return caches.match("/offline.html"); +// } // }); // }); // }