When i use the following code to clone images from the page and append to a div, they get reloaded from the server. Is this expected behaviour? I am using FF 9. Thanks
var modal = $('<div id="modal"></div>');
$('img').each(function(){
$(this).clone().appendTo(modal);
});
When you clone the image, you create a new
<img>tag, which is rendered like any new<img>tag would be. Most browsers would make a request when they see a new<img>tag, if the server did not specify any caching behavior for the image to which the tag points.