How can I read the current headers without making a new request with JS?

http-headers, javascript

Solution

It's not possible to access page headers via Javascript, without sending ajax request.

Problem

Possible Duplicate: Accessing HTTP Headers in Javascript? The only way what i know to read with javascript the current headers is: ``` var req = new XMLHttpRequest(); req.open('GET', document.location, false); req.send(null); var headers = req.getAllResponseHeaders().toLowerCase(); ``` But i don't want make a new request, i want read the current headers. Is this posible? Thanks!

Original source

Related problems