<html>
<body>
<h1>XMLHttpRequest</h1>
<p>The getAllResponseHeaders() function returns the header information of a resource, like length, server-type, content-type, last-modified, etc:</p>
<p id="demo"></p>
<script>
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange=function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML =
this.getAllResponseHeaders();
}
};
xmlhttp.open("GET.html", "xmlhttp_info.txt", true);
xmlhttp.send();
</script>
</body>
<!-- Mirrored from www.w3schools.com/xml/tryit.asp?filename=try_dom_xmlhttprequest_header by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:23:25 GMT -->
</html>