$.ajax({
url: 'https://www.gravatar.com/avatar/71b0d516013802a2d67aeb7c2e77ed32?s=48&d=identicon&r=PG&f=1',
success: function(r, s, x){
var type = x.getResponseHeader("content-type");
console.log(type);
}
});
This is the ajax requesti written to get the type of image .How can i do the same with pure javascript?