Quantcast
Channel: Internet Explorer 8, 9, 10, 11 forum
Viewing all articles
Browse latest Browse all 10469

Accessing HTTP Response Header Variable

$
0
0

I am using Javascript to access the value of the HTTP Response Variable, Server, and am displaying the value on the web page, as a test. Once this is successful, I will be executing other logic based on the value returned in the variable. Essentially I want to handle some operations differently depending on whether the server is IIS or Apache.

In my test Javascript, I am alerting all response headers (getAllResponseHeaders()) and the Server response header (getResponseHeader("Server")), then I am passing the value of getResponseHeader("Server") onto a field on the web page.

I have tested this with 4 browsers, so far. It works fine in Chrome, in Safari on Windows and also in Safari on an iPad tablet. In IE 11, the first time I execute the Javascript, it works correctly, getResponseHeader("Server") returns Apache or Microsoft-IIS/8.0 depending on the backend server. In subsequent executions on IE 11, though, getResponseHeader("Server") returns a null value. If I delete browsing history, it will work again once, but after that I receive null for the value.

Is this a bug in IE 11? Or is there some setting that will change the behaviour to what I am expecting, and what the other browsers deliver, - the Server response value each time? Or is there a better, more reliable way to retrieve this value in IE?


Viewing all articles
Browse latest Browse all 10469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>