<!DOCTYPE html>
<html>
<body>
<h2>XMLHttpRequestオブジェクト</h2>
<p>getResponseHeader()関数は、長さ、サーバータイプ、コンテンツタイプ、最終変更日などの特定のヘッダー情報をリソースから返すために使用されます。</p>
<p>Last modified: <span id="demo"></span></p>
<script>
const xhttp=new XMLHttpRequest();
xhttp.onload = function() {
document.getElementById("demo").innerHTML =
this.getResponseHeader("Last-Modified");
}
xhttp.open("GET", "ajax_info.txt");
xhttp.send();
</script>
</body>
</html>