How can I read the current headers without making a new request with JS? [duplicate]
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!
Solution 1:
It's not possible to access page headers via Javascript, without sending ajax request.