I am currently using following script in a hover-functionality:
function UrlExists(url) {
var http = new XMLHttpRequest();
http.open('HEAD', url, false);
http.send();
return http.status!=404;
}
It loads every image each after the other, causing to slow down the entire website (or even crashing).
Is there a way to check if an image exists, though prevent loading it (fully) using javascript?
Thanks alot!