I have a piece of Java code which tries to access the header information posted by an html page.Right now I don't have the html page but I need to access the header information in the java file details.Can anyone please help me in writing a html page which sets header information?
A:
Headers cannot be changed by a plain html file.
What you are trying to achieve though may be doable via "meta http-equiv" directives. So, what are you trying to achieve?
cherouvim
2010-02-15 09:48:36
meta http-equiv is ok.Is there any syntax?
Harish
2010-02-15 10:05:59
A:
Since you tagged it javascript: Use an AJAX request. You can use the setRequestHeader(header, value)
method of XMLHttpRequest
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.setRequestHeader("HeaderName", "value");
xhr.onreadystatechange = function(){};
xhr.send();
Amarghosh
2010-02-15 09:51:59