-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
The suggested serverSync implementation with synchronous XHR (taken from http://keith-wood.name/countdownRef.html)
$(selector).countdown({
until:liftoffTime, serverSync: serverTime
});
function serverTime() {
var time = null;
$.ajax({url: 'http://myserver.com/serverTime.php',
async: false, dataType: 'text',
success: function(text) {
time = new Date(text);
}, error: function(http, message, exc) {
time = new Date();
}});
return time;
}
would soon begin failing across all browsers due to the deprecation of synchronous XMLHttpRequests due to its negative effect on user experience. Please see: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-extensions/WH1wOAxJQiM
At the moment there is no other way to use serverSync except for providing a callback that returns the server time using a synchronous XMLHttpRequest
Metadata
Metadata
Assignees
Labels
No labels