title: Abort active image requests
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/930237/javascript-cancel-stop-image-requests">Javascript: Cancel/Stop Image Requests</a>  </p>
  </blockquote>
  
  
  
  <p>How to abort an Image request which is still on the fly?</p>
  
  <p>Example:</p>
  
  <pre><code>var img = new Image();
  var img.src = "http://www.google.co.in/images/nav_logo29.png";
  window.setTimeout(function(){
       //Code to abort/cancel image request if it hasn't triggered onload or onerror even after 20 seconds of sending request.
  },20000)
  </code></pre>