Skip to content

Instantly share code, notes, and snippets.

@szydan
Created April 27, 2022 21:58
Show Gist options
  • Save szydan/3d83de96d78f332096c5d74cf0ce91bb to your computer and use it in GitHub Desktop.
Save szydan/3d83de96d78f332096c5d74cf0ce91bb to your computer and use it in GitHub Desktop.
test HEAD
const testHEAD = function(url) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("HEAD", url, true);
xmlhttp.onreadystatechange=function() {
if(xmlhttp.readyState==4) {
console.log(xmlhttp.getAllResponseHeaders());
}
}
xmlhttp.send(null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment