|
Posted by cosmic foo on 10/18/34 11:22
I have a page with about 100 images of about 10k each.
where a typical img tag looks like this,
<img src="item001.jpg" height="70" alt="" onMouseOver="showPic(this)"
border="0">
Not all the images need to be viewed at once, depending on what category is
selected, only about 10 images are seen at any one time.
I hide and show categories of images by setting a div container
display:none/block or visibility:hidden/visible.
Even though the images are cached on the client, when the page loads in ie,
there is still a few seconds delay while it counts down until there are no
items remaining.
In firefox there is the same delay but instead of counting down it just says
'waiting for..'
From what i understand, the way to get around this delay when loading is not
to set the src of the image tags until later, when the images need to be
viewed (using javascript).
That's not a problem and i have tried it, and it works, but now (for some
reason) the browser forgets that the images have been cached whenever the
user returns to the site, and has to download the images from the server,
the first time a particular category of images is viewed.
This, i presume, is happening because the src attribute is no longer
hard-coded in the source, and the browser cannot associate an entry in the
cache with the src of an image that is set via javascript?
So it looks like the only solution may be to generate the html on the fly,
when it is needed, with the src intact, or to use frames to get the html
when it is needed.
Am i missing something here?
Thanks.
Navigation:
[Reply to this message]
|