summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-11-19 15:09:13 +0300
committerAndrew Dolgov <[email protected]>2019-11-19 15:09:13 +0300
commit520e31b1621a69ce3157553c8ae29991555edbe4 (patch)
treeaf76dba7a27f54d264481903722b4944bca40050
parente71b809160d6e7a85c1e7d0a0c7ff5db57dbca4f (diff)
auto-reload page initially to activate sw
-rw-r--r--js/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/index.js b/js/index.js
index bf892be..983db0b 100644
--- a/js/index.js
+++ b/js/index.js
@@ -30,7 +30,12 @@ function cache_refresh(force) {
$(".dl-progress")
.show()
.addClass("alert-info")
- .html("Please reload the page once to activate service worker and populate offline cache.");
+ .html("Page will reload to activate service worker...");
+
+ window.setTimeout(function() {
+ window.location.reload();
+ }, 3*1000);
+
});
}