diff options
author | tdro <tdro@noreply.example.com> | 2023-04-12 20:12:42 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-04-12 20:12:42 -0400 |
commit | 18a33f07c4cffb1152be0c98dda3a21e9350046c (patch) | |
tree | 11126820c1de8f24268aa2f8f0dbef3c7b3d979e /static/js/refresh.ts | |
parent | 34c734a89530b5d83b1a4a5060ea7a887d9ccafd (diff) | |
download | canory-18a33f07c4cffb1152be0c98dda3a21e9350046c.tar.gz canory-18a33f07c4cffb1152be0c98dda3a21e9350046c.tar.bz2 canory-18a33f07c4cffb1152be0c98dda3a21e9350046c.zip |
static/js/refresh: Definition order
Diffstat (limited to 'static/js/refresh.ts')
-rw-r--r-- | static/js/refresh.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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); |