I need to get the text of a custom HTTP Header with Javascript, the header I need is not the User Agent, I already have that covered with this code:
var userAgent = navigator.userAgent
What I need is to get the content (like: Custom Header Text
) of a custom header called (for example): CustomHeader
.
The Header is sent by the browser when accessing a website (and showing it to the user) with the Javascript code on the website, so I guess I would have no problem with the same-origin policy, since it's only a website with a Javascript code on it (with script
tags).
Is it possible? If so, how can I get the content of that header with Javascript?
Thanks a lot.