From 720b32ec4858b6ece1593fb68f5f1354d3af0931 Mon Sep 17 00:00:00 2001 From: altaf-creator <64111012+altaf-creator@users.noreply.github.com> Date: Thu, 4 May 2023 19:51:54 +0700 Subject: PWA Update - attempt 3.3 (i should have used another branch) --- src/scripts/main.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/scripts') diff --git a/src/scripts/main.js b/src/scripts/main.js index becd684..b793fc8 100644 --- a/src/scripts/main.js +++ b/src/scripts/main.js @@ -26,6 +26,10 @@ function urlExists(url) { var http = new XMLHttpRequest(); http.open('HEAD', url, false); http.send(); + + if (http.status != 200) + console.log(url) + return http.status != 404; } if ("serviceWorker" in navigator) { -- cgit v1.2.3