How can I control image preload request?
<p>I have a html markup. I need a DOM tree to rewrite image's src attribute.My code is as bellow... </p>

<pre><code>var markup = '&lt;img src="abc.jpg"/&gt;';
var div = document.createElement("div");
div.innerHTML = markup; 
(rewrite logic here(div))
document.body.appendChild(div);
</code></pre>

<p>However when execute at the 3rd line a error request is send out. </p>

<p><em><strong>GET <a href="http://stackoverflow.com/questions/ask/abc.jpg">http://stackoverflow.com/questions/ask/abc.jpg</a> 404 (Not Found)</em></strong></p>

<p>How can I control this image preload request? When I append the element into the document then send out.</p>

<p>I use  documentFragment as a test, it also have this problem.</p>

<pre><code>var str ='&lt;img src="abc.jpg"/&gt;';
var range =document.createRange();
range.selectNodeContents(document.documentElement);
var fragment =range.createContextualFragment(str);
</code></pre>
