How do I access a page\'s HTTP response headers via JavaScript?
Related to this question, which was modified to ask about accessing two specific HTTP headers.
If we're talking about Request headers, you can create your own headers when doing XmlHttpRequests.
var request = new XMLHttpRequest(); request.setRequestHeader("X-Requested-With", "XMLHttpRequest"); request.open("GET", path, true); request.send(null);