I have a script that loads the SO logo in exactly 3 seconds, which I did for another question.
http://alexturpin.net/slowimage/slowimage.php
Using it, I tried to reproduce the problem:
var img = new Image(); img.onload = function() { alert("loaded"); }; img.src ="http://alexturpin.net/slowimage/slowimage.php"; setTimeout(function() { img.src = ""; }, 1000);
http://jsfiddle.net/Xeon06/RrUvd/1/
From what I collect, onload does not start in Chrome, but the browser continues to display a counter, and if I go to the network tab and find my image and navigate its contents, it is. So my answer will be no , the image still loads, at least in Chrome.
This is an interesting problem, I suggest you try and test it in as many browsers as possible and write some kind of blog entry on it.
Alex turpin
source share