Event Timeline
Comment Actions
Added comments
var xmlhttp = new XmlHttpRequest();
xmlhttp.open("HEAD", "/test/this/page.php",true); Make async HEAD request (must be a relative path to avoid cross-domain restrictions)
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { // make sure the request is complete alert(xmlhttp.getAllResponseHeaders()) // display the headers }
}
xmlhttp.send(null); // send request