I need to get the meta tag of a specific external url, however I found only examples using jquery to perform this functionality, not pure javascript. In pure js, I found this post where I accomplished what I need, but not on any external page, but on the page itself.
function getVideoContent() {
var metas = document.getElementsByTagName('meta');
for (var i=0; i<metas.length; i++) {
if (metas[i].getAttribute("property") == "video") {
return metas[i].getAttribute("content");
}
}
return "";
}
Does anyone know how I can get meta tag information from any url using pure javascript?