Created
April 3, 2012 05:35
-
-
Save niyazpk/2289547 to your computer and use it in GitHub Desktop.
Get the server time using JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: 'HEAD', | |
url: '/', | |
success: function(data, textStatus, jqXHR){ | |
log( new Date(jqXHR.getResponseHeader('Date')) ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment