]> iEval git - plack-app-gruntmaster.git/commitdiff
Use HEAD /204 instead of HEAD / to get server time for timers
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 6 Apr 2016 10:13:46 +0000 (13:13 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 6 Apr 2016 10:13:46 +0000 (13:13 +0300)
js/90-timers.js

index 8833a114289a7ee6ef3765f36101f1d766592788..85807762429f70ee56957dad0640c19904bb93c5 100644 (file)
@@ -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);
This page took 0.025085 seconds and 4 git commands to generate.