Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Image cache
03-07-2005, 01:13 PM #1
- Join Date
- Jun 2002
- Thanked 0 Times in 0 Posts
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.innerHTML += ' <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