Trace Trace - 1 year ago 75
Javascript Question

Is there a way to do a http head request and get the time without a server side langauge

Ok so I am trying to do a http head request from the Javascript code to get the server time ...Can i do this from javascript or do i need a server side language to achieve this

Answer Source

Assuming your server sends the Date header (which the RFC says it MUST), sure:

$.ajax('/', {
    type: 'HEAD',
    success: function(r,status,xhr) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download