From 520e31b1621a69ce3157553c8ae29991555edbe4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Nov 2019 15:09:13 +0300 Subject: auto-reload page initially to activate sw --- js/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + }); } -- cgit v1.2.3