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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load images into cache

Status
Not open for further replies.

davidl

Technical User
Sep 20, 2000
4
IN
I need to load about a dozen images into cache on the first page of a site. This first page may only be visible for a few seconds due to the user following a link from that page.

After browsing through several pages (without images), I'd like images to display instantaneously (from cache) on pages that do have images.

Is this possible?

I've tried using this type of code in the HEAD section of my page, but it results in error: Expected ';'

Code:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

<!--

image1 = new Image();
image1.src = &quot;/graphics/image1.jpg&quot;;

image2 = new Image();
image2.src = &quot;/graphics/image2.jpg&quot;;

// -->

</SCRIPT>

Any help would be much appreciated.

Thanks,

David Lord

PS: I may need to extend this to .wav files too. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top