Javascript stop image loading

Once DOM is loaded stop downloading any of resources (window.stop() for modern browsers, document.execCommand("Stop", false) for IE). Then find resources you are required in and ask browser to download them.


You can select the image with the URL and remove it from DOM

$(document).ready(function(){
    $('img[src="http://image.com/img.png"]').remove();
});

Update 1:

As you probably wanted partial matching, try this one:

$(document).ready(function(){
   $('img[src*="image.com/img.png"]').remove(); 
});

You cannot cancel a download of a single resource with JavaScript. As @nkamm answered, you could invoke the window.stop() method, but then it stops downloading any of resources (like pressing the "stop" button in the browser).

If the image you try to stop downloading will not be rendered in the DOM, it worth cancel all other downloads in your page?