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 /assets | |
parent | 34c734a89530b5d83b1a4a5060ea7a887d9ccafd (diff) | |
download | canory-18a33f07c4cffb1152be0c98dda3a21e9350046c.tar.gz canory-18a33f07c4cffb1152be0c98dda3a21e9350046c.tar.bz2 canory-18a33f07c4cffb1152be0c98dda3a21e9350046c.zip |
static/js/refresh: Definition order
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/assets/js/index.js b/assets/js/index.js index f2c4ae4..1e267b9 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -80,8 +80,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); if (modified) { |