By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,027 Members | 1,088 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,027 IT Pros & Developers. It's quick & easy.

Preload many images

P: n/a
I have tried several preload scripts found here; plus, some of my own.
The only thing that works is the unsophisticated loading of those
tiny images. The download consist of 100+ images amounting to 50+mb;
and, normally completes in less than 1 minute without preload (using
DSL). The preload terminates after 6 or 7
images and seems to time-out in the middle of an image. A reload will
download a few more, etc. I have used the <body onLoad=function()>
approach as well as the
non-function approach of JS that executes immediately with the page's
loading.
Getting the same results with Netscape-7 and IE-6.

I need to add: The source of the array containing the image
references is a '.js' file. That doesn't seem pertinent as some of the
images always load.

Got any ideas??

Tx Albert Spencil
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Albert Spencil wrote:

I have tried several preload scripts found here; plus, some of my own.
The only thing that works is the unsophisticated loading of those
tiny images. The download consist of 100+ images amounting to 50+mb;
and, normally completes in less than 1 minute without preload (using
DSL). The preload terminates after 6 or 7
images and seems to time-out in the middle of an image. A reload will
download a few more, etc. I have used the <body onLoad=function()>
approach as well as the
non-function approach of JS that executes immediately with the page's
loading.
Getting the same results with Netscape-7 and IE-6.

I need to add: The source of the array containing the image
references is a '.js' file. That doesn't seem pertinent as some of the
images always load.

Got any ideas??

Tx Albert Spencil


Albert,

If you show us some code, we may be able to help.

J.
Jul 23 '05 #2

P: n/a
Juliette <"jrf[spamblock]"@jokeaday.net> wrote in message news:<40***************@jokeaday.net>...
Albert Spencil wrote:

I have tried several preload scripts found here; plus, some of my own.
The only thing that works is the unsophisticated loading of those
tiny images. The download consist of 100+ images amounting to 50+mb;
and, normally completes in less than 1 minute without preload (using
DSL). The preload terminates after 6 or 7
images and seems to time-out in the middle of an image. A reload will
download a few more, etc. I have used the <body onLoad=function()>
approach as well as the
non-function approach of JS that executes immediately with the page's
loading.
Getting the same results with Netscape-7 and IE-6.

I need to add: The source of the array containing the image
references is a '.js' file. That doesn't seem pertinent as some of the
images always load.

Got any ideas??

Tx Albert Spencil


Albert,

If you show us some code, we may be able to help.

J.


OK. This is a very simple one. For NS4.7 it preloads anywhere from 2
to all (79). For NS7x it preloaded 7 and on restores it downloaded a
few more each time. For IE6 it consistently preloads just the last
image (#79).

<script src='imageFile.js'></script> // contains the array 'pics'
<script language='javascript'><!--
/*-------------Function to preload images----------------*/

function doPreload()
{

for(loop = 0; loop < pics.length; loop++)
{
var an_image = new Image();
an_image.src = pics[loop];
}
}
/*-------------------------------------------------------------------*/
//-->
</script>
</head>
<body onLoad=doPreload() bgcolor="#004f00" text="#ffffff"
link="#ffffff" vlink="ffffff" alink="ffff48">
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.