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