View Full Version : Image cache

03-07-2005, 02:13 PM
Hi. I have a piece of client-side code that searches the current page's
links. If it determines a link < 60 days ago, it uses
document.links[0].innerHTML += '&nbsp;<img src="'+_img.src+'">', where
_img = new Image() ; _img.src = "new.gif".

Problem. If there are 30 links on my page, it seems the image "new.gif"
has to be downloaded 30 times. If true, why? I wonder if I shouldn't
first put in a timeout loop and wait for _img.complete to be true. Or
would that make no difference? Any advice would be appreciated...Dennis