From: Marius Gavrilescu Date: Wed, 6 Apr 2016 10:13:46 +0000 (+0300) Subject: Use HEAD /204 instead of HEAD / to get server time for timers X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=546df1e3e3b08c1789733c70e81869b29d7355d3;p=plack-app-gruntmaster.git Use HEAD /204 instead of HEAD / to get server time for timers --- diff --git a/js/90-timers.js b/js/90-timers.js index 8833a11..8580776 100644 --- a/js/90-timers.js +++ b/js/90-timers.js @@ -29,7 +29,7 @@ $(() => { }); if($('.timer').length > 0) { const xhr = new XMLHttpRequest(); - xhr.open('HEAD', '/'); + xhr.open('HEAD', '/204'); xhr.onload = () => { const srvtime = Date.parse(xhr.getResponseHeader('Date')); offset = Math.ceil((srvtime - Date.now()) / 1000);