faqts : Computers : Programming : Languages : JavaScript : Document

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 23 people (87%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

How can I read the HTTP response headers of the page?

Feb 17th, 2001 08:38
Martin Honnen,


The browser object model doesn't provide access to these headers but in 
IE5+ you have an ActiveX Object 
  Microsoft.XMLDOM
which can request the page and return the headers
  var http = new ActiveXObject('Microsoft.XMLHTTP');
  http.open('HEAD', location.href, false);
  http.send();
  alert(http.getAllResponseHeaders())