diff options
Diffstat (limited to 'src/components/ConnectivityChecker.vue')
-rw-r--r-- | src/components/ConnectivityChecker.vue | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue index 0d7e79f..f2be652 100644 --- a/src/components/ConnectivityChecker.vue +++ b/src/components/ConnectivityChecker.vue | |||
@@ -56,7 +56,8 @@ export default { | |||
56 | 56 | ||
57 | // extra check to make sure we're not offline | 57 | // extra check to make sure we're not offline |
58 | let that = this; | 58 | let that = this; |
59 | return fetch(window.location.href + "?alive", { | 59 | const aliveCheckUrl = window.location.href + "?t="+(new Date().valueOf()); |
60 | return fetch(aliveCheckUrl, { | ||
60 | method: "HEAD", | 61 | method: "HEAD", |
61 | cache: "no-store", | 62 | cache: "no-store", |
62 | redirect: "manual" | 63 | redirect: "manual" |
@@ -64,7 +65,7 @@ export default { | |||
64 | .then(function (response) { | 65 | .then(function (response) { |
65 | // opaqueredirect means request has been redirected, to auth provider probably | 66 | // opaqueredirect means request has been redirected, to auth provider probably |
66 | if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) { | 67 | if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) { |
67 | window.location.href = window.location.href + "?t="+(new Date().valueOf()); | 68 | window.location.href = aliveCheckUrl; |
68 | } | 69 | } |
69 | that.offline = !response.ok; | 70 | that.offline = !response.ok; |
70 | }) | 71 | }) |