<!DOCTYPE html>
<html>
<body>
<h2>XMLHttpRequestオブジェクト</h2>
<p>getAllResponseHeaders()関数は、長さ、サーバータイプ、コンテンツ タイプ、最終変更日など、リソースのすべてのヘッダー情報を返します。</p>
<p id="demo"></p>
<script>
const xhttp = new XMLHttpRequest();
xhttp.onload = function() {
document.getElementById("demo").innerHTML =
this.getAllResponseHeaders();
}
xhttp.open("GET", "ajax_info.txt");
xhttp.send();
</script>
</body>
</html>