Please, do something about the way your "newsreader" (line-)breaks quotes.
An image pre-load script shouldn't cause the page to stop loading
unless you've specifically coded it to suppress display: block;
on a <div> that wraps the entire page or something.
Images are _inline_ elements and newly created Image objects are
not displayed. What exactly are you trying to suggest here? It
does not matter what stylesheet has been used; in fact, the way
of "preloading" rather matters.
<head>
<script type="text/javascript">
var myImages = [];
for (var ii = 0; ii < 63; ++ii)
{
var myImage = new Image();
myImage.src = 'yourImageName' + ii + '.jpg';
myImages.push(myImage);
}
</script>
</head>
The user agent will (should) queue up 63 GET requests for the images and
continue loading and caching them while it parses and renders the rest
of the page. [...]
No, control flow will not be taken from the script engine until it is
finished. Since it works single-threaded and there is no guarantee that
assignments to properties of host objects like Image objects result in
asynchronous operation, it is likely that it locks up the
parsing-and-rendering process until completed. That is, this approach
will rather slow down this for the user than speeding it up since the
user will not see the loading in progress in contrast to sequential
resource display.
So, instead of such a script, the `window' or `document' object's, or `body'
element's onload event handler should be used since it has been observed
that this event handler can fire before all images are loaded. But still,
such "preloading" only works if the cache settings are appropriate; since
the programmer does not have control over it, it is merely of academical
interest to take it into account. More, large images will quickly fill up
the cache and have to make room for more images and so caching will have
little effect on loading speed for those.
There's still no guarantee that image 62 will be available
if the user jumps straight to it as soon as the page is finished
loading, but if the user accesses the images sequentially, there
is a pretty good chance that each image will have been downloaded
and cached before it is required.
The chance that the user leaves frustrated before loading has finished
since he does not notice any progress is considerably higher than that.
Although I'm not sure how many dial-up users would be happy with you
tying up their bandwidth to download 6MB of images, some of which they
may never look at.
Indeed, an image gallery should be implemented with thumbnails so that
larger images are only displayed if the user wishes them to be displayed.
PointedEars