homepage Welcome to WebmasterWorld Guest from 54.242.85.89
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Preload using js
toolman




msg:1493071
 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




msg:1493072
 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?

tedster




msg:1493073
 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:

[tropo.com...]

toolman




msg:1493074
 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.

pshea




msg:1493075
 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.

stavs




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

Yep - good trick! Will be using that soon.

tedster




msg:1493077
 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)
big.src="big.gif"

//-->
</script>

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved