projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a94602
)
Use HEAD /204 instead of HEAD / to get server time for timers
author
Marius Gavrilescu
<marius@ieval.ro>
Wed, 6 Apr 2016 10:13:46 +0000
(13:13 +0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Wed, 6 Apr 2016 10:13:46 +0000
(13:13 +0300)
js/90-timers.js
patch
|
blob
|
blame
|
history
diff --git
a/js/90-timers.js
b/js/90-timers.js
index 8833a114289a7ee6ef3765f36101f1d766592788..85807762429f70ee56957dad0640c19904bb93c5 100644
(file)
--- 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);
This page took
0.010679 seconds
and
4
git commands to generate.