From 18a33f07c4cffb1152be0c98dda3a21e9350046c Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 12 Apr 2023 20:12:42 -0400 Subject: static/js/refresh: Definition order --- static/js/refresh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static') diff --git a/static/js/refresh.ts b/static/js/refresh.ts index 2a8a089..2b96751 100644 --- a/static/js/refresh.ts +++ b/static/js/refresh.ts @@ -16,8 +16,8 @@ function update() { const url = self.location.href.split("#")[0].split("?")[0]; check(url, "HEAD", function (request) { - const remote = request.getResponseHeader("last-modified") || local; const local = document.querySelector('meta[name="last-modified"]').content; + const remote = request.getResponseHeader("last-modified") || local; const modified = Date.parse(document.lastModified) !== Date.parse(remote); const drift = Date.parse(remote) - Date.parse(local); -- cgit v1.2.3