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.
<
Another way to send header information to JavaScript would be through cookies. The server can extract whatever data it needs from the request headers and send them back inside a Set-Cookie
response header — and cookies can be read in JavaScript. As keparo says, though, it's best to do this for just one or two headers, rather than for all of them.