<!DOCTYPE html>
<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", "xmlhttp_info.txt", true);
xmlhttp.send();
</script>
</body>
</html>