homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Preload using js

 2:29 am on Jun 28, 2001 (gmt 0)

Is there a way I can preload a class file and a zip file for a java applet on the next page using js on the current page?


Black Knight

 7:28 am on Jun 28, 2001 (gmt 0)

Would placing the java applet into a hidden layer on the previous page do the trick for you?


 7:45 am on Jun 28, 2001 (gmt 0)

I don't know of a JavaScript technique, but here's another shot at a pure java one:



 3:02 pm on Jun 28, 2001 (gmt 0)

Cool. It was simpler than I made it out to be after all. I know most people don't like java applets but I have some that I think are extremely neat.


 10:59 pm on Jun 28, 2001 (gmt 0)

From the page tedster referenced above comes:

"And just for completeness, the standard HTML trick of preloading images is done via putting something like this:

<img src="big.gif" width=1 height=1>

on a page before "big.gif" is needed - then when it is later loaded it will appear instantly as it will be in the browser image cache."

Well, that was not standard information for me and is a fantastic pickup for precisely what I need. Thank you.


 11:30 pm on Jun 28, 2001 (gmt 0)

Yep - good trick! Will be using that soon.


 3:10 am on Jun 29, 2001 (gmt 0)

The 1x1 image pre-load has the benefit of being pure HTML rather than JavaScript. But the method has the downside of creating a dot on the page.

If you trust using JavaScript, you can get an invisible preload by including this at the very bottom your HTML code (so it doesn't slow down the loading for the visible page:

<script type="text/javascript" language="JavaScript">

big=new Image(width,height)


All this code does is cache the image for later use, the way you would do with a roll-over image, and nothing is visible until you want it to be.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved