Preload many images

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Albert Spencil

    Preload many images

    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
  • Juliette

    #2
    Re: Preload many images

    Albert Spencil wrote:[color=blue]
    >
    > 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[/color]

    Albert,

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

    J.

    Comment

    • Albert Spencil

      #3
      Re: Preload many images

      Juliette <"jrf[spamblock]"@jokeaday. net> wrote in message news:<40A6A1BF. 55F1EABE@jokead ay.net>...[color=blue]
      > Albert Spencil wrote:[color=green]
      > >
      > > 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[/color]
      >
      > Albert,
      >
      > If you show us some code, we may be able to help.
      >
      > J.[/color]

      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='javas cript'><!--
      /*-------------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=doPreloa d() bgcolor="#004f0 0" text="#ffffff"
      link="#ffffff" vlink="ffffff" alink="ffff48">

      Comment

      Working...