Getting Date from http header response

It might be the case you are making a CORS request and the headers are filtered out for security reasons.

See also similar question about missing response headers in ajax request. The solution might be to set this HTTP header in the server response:

Access-Control-Expose-Headers: Date

This Helped :

var req = new XMLHttpRequest();
req.open('GET', document.location, false);
req.send(null);
var headers = req.getAllResponseHeaders().toLowerCase();
alert(headers);

Accessing the web page's HTTP Headers in JavaScript