It is currently Sat Dec 02, 2017 4:04 pm Advanced search
//var url = 'http://www.example.com/';
var x = new XMLHttpRequest();
x.open('GET', url, false);
var h = x.getAllResponseHeaders();
Right, there's no way to do that. The server can repeat the headers in the response body in an HTML comment or as a JSON blob in a <script> block or whatever, though.sproket wrote:Hi all,
It seems you can do this by sending a separate head request with XMLHttpRequest, however that means making another trip to the server.
sproket wrote:If the server sends back arbitrary HTTP headers there seems to be no way of reading these.
Users browsing this forum: No registered users and 1 guest