Forum Moderators: open
<script language="JavaScript">
MM_preloadAllImages('
images/soandso1.gif','
images/soandso2.gif','
images/soandso3.gif','
images/soandso4.gif','
images/soandso5.gif'')
</script>
When you've got a very likely-to-be-clicked link to a page with a large graphic or graphics, you can pre-load the graphic while your visitor is reading the earlier page. Then it's already in the cache and loads instantly if they click through.At the very bottom of the BODY section, so your script doesn't interfere with the page that's being rendered:
<script type="text/javascript" language="JavaScript">
<!--
image01=new Image(www,hhh)
image02=new Image(www,hhh)image01.src="fatone.gif"
image02.src="biggie.jpg"
//-->
</script>
<a href="pix.gif" width="1" height="1" border="0">
The images will display as all but invisible pepper grains (1 pixel), but now they're in the browser's cache and will load quickly on subsequent pages
Does the image load have to start over, or can it just continue where it left off?
It needs to begin again.
Any downfalls to doing it that way?
Besides the flecks of pepper?
Depending on your layout and what browser is being used to access the page, the download of these "bottom feeders" may delay the rendering of the images up top - the ones that belong to the page content itself. As far as the browser can tell, they DO belong to the page itself, so the rendering order might get funky.
The front page is for a Flash intro (sorry to use the 'F' word, the client came to me with a Flash intro and wants to keep it). I will place the image loader
> At the very bottom of the BODY section, so your script doesn't interfere with the page that's being rendered.
However the page that's being rendered is the Flash intro. I have added and nice obviouse 'Skip Intro' link - I suspect one or two people will 'Skip Intro' and go to the 2nd 'menu' page (no more Flash). So, does that mean visitors who skip will get the menu images downloading all over again? - I see no way out of that so guess I will have to live with it. Will visitors who sit back to watch to very exciting Flash intro get the 2nd page nice and quickly?
Re. <a href="pix.gif" width="1" height="1" border="0">
Hidden links: Isn't this seen as a method of spamming by Google?
...one or two people will 'Skip Intro' and go to the 2nd 'menu' page (no more Flash). So, does that mean visitors who skip will get the menu images downloading all over again?
If they didn't stay on page 1 long enough for background downloads to finish, yes, that's what will happen - but it will just be a problem with the images that were incomplete downloads.
I never tried this on a Flash page - I'm guessing that the javascript might not kick in until the whole Flash movie is downloaded! You might have better luch with the cracked peeper method! It's worth a couple experiments, I'd say.