From 1a083c05f74ba929da347263c91f1479bb66d221 Mon Sep 17 00:00:00 2001 From: tdro Date: Mon, 10 Apr 2023 14:14:10 -0400 Subject: static/js/refresh: Jitter is within seconds --- static/js/refresh.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'static') diff --git a/static/js/refresh.ts b/static/js/refresh.ts index 88710fa..d308014 100644 --- a/static/js/refresh.ts +++ b/static/js/refresh.ts @@ -17,9 +17,9 @@ check(url, "HEAD", function (request) { const local = document.querySelector('meta[name="last-modified"]').content; const remote = request.getResponseHeader("last-modified") || local; - const localHour = local.substring(0, local.length - 9); - const remoteHour = remote.substring(0, remote.length - 9); - const modified = localHour !== remoteHour; + const localSecond = local.substring(0, local.length - 5); + const remoteSecond = remote.substring(0, remote.length - 5); + const modified = localSecond !== remoteSecond; if (modified) { const indicator = document.querySelector("a[data-update]"); -- cgit v1.2.3