PDA

View Full Version : Should I load all gifs on page load?



wkenny
09-15-2005, 01:29 PM
Pages on my site give lists of businesses in the area and I use flag gifs to indicate the labguages spoken in the business. If I have 62 businesses all of whom speak English and Spanish, then I have 62 copies of each flag. The business entries are in a table with relevent img src in a col after business name.

Do the browsers go back to the server for each img src to download the flags or are they smart enough to know they already have downloaded the image?

Will the page load faster if I use a script to download all the images on page load?

Billy

Twey
09-15-2005, 02:14 PM
No, they know that they've already downloaded the image and use the one they've cached.
The images are already downloaded on page load. By default, images are downloaded when they are viewed. In your case, this is on page load.

wkenny
09-15-2005, 02:35 PM
Thanks, Twey