Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pre-loading to cache?

Status
Not open for further replies.

DGTLguy

Technical User
Jul 23, 2003
125
US
okay, i noticed that when creating rollover buttons in Dreamweaver it automatically preloads the second image using code like:

...onLoad="MM_preloadImages('images/home_btn_on.gif','images/about_btn_on.gif')"....

so i got an idea... why not load images from additional pages in my site. that way they are already in the browser's cache, cutting down on loading time... so i added the additional images in the code:

...onLoad="MM_preloadImages('images/home_btn_on.gif','images/about_btn_on.gif', 'images/portfolio_img1.gif', 'images/portfolio_img2.gif')"...

DOES THIS WORK?
ARE THERE ANY PROBLEMS WITH DOING IT THIS WAY?
 
Will work fine. Be aware of the accumulated file size (potentially) slowing down your page load. This is a similar thing to the prefetching link concept.

Cheers,
Jeff


[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
hey jeff, thanks for the fast response... i took the time to look up link prefetching since you mentioned it...

it says that link prefetching utilizes browser idle time, which is a concept i like...

(but i don't think its supported by explorer), i'm a safari surfer myself so i should say the hell with it but you gotta consider your users...

it also seems to be a little more complicated to set up...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top