cosmic foo wrote:[color=blue]
> "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
> news:42e6479c$1_3@mk-nntp-2.news.uk.tiscali.com...[color=green]
>> cosmic foo wrote:[color=darkred]
>>> 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[/color][/color]
> is[color=green][color=darkred]
>>> 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[/color][/color]
> ie,[color=green][color=darkred]
>>> there is still a few seconds delay while it counts down until there are[/color][/color]
> no[color=green][color=darkred]
>>> items remaining.
>>> In firefox there is the same delay but instead of counting down it just[/color][/color]
> says[color=green][color=darkred]
>>> 'waiting for..'
>>>
>>> From what i understand, the way to get around this delay when loading is[/color][/color]
> not[color=green][color=darkred]
>>> 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[/color][/color]
> some[color=green][color=darkred]
>>> reason) the browser forgets that the images have been cached whenever[/color][/color]
> the[color=green][color=darkred]
>>> user returns to the site, and has to download the images from the[/color][/color]
> server,[color=green][color=darkred]
>>> 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[/color][/color]
> the[color=green][color=darkred]
>>> 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[/color][/color]
> fly,[color=green][color=darkred]
>>> 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.
>>>
>>>[/color]
>> you could try a css method for preloading?:
>>
>>
http://www.ilovejackdaniels.com/css...mages-with-css/[/color]
>
> Thanks but wouldn't that just retain the delay when the page loads, which i
> am trying to avoid?
> What would be great is if display:none caused an image not to load until it
> was changed to display:block.
> Either that or if there was some way to set the src of an image using
> javascript and still have it cached
> when you return to the site.
>
>[/color]
not sure lol, sorry