Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > many images delay even when cached

Reply
Thread Tools

many images delay even when cached

 
 
cosmic foo
Guest
Posts: n/a
 
      07-26-2005
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.



 
Reply With Quote
 
 
 
 
Jedi Fans
Guest
Posts: n/a
 
      07-26-2005
cosmic foo wrote:
> 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.
>
>
>

please dont cross post
 
Reply With Quote
 
 
 
 
cosmic foo
Guest
Posts: n/a
 
      07-26-2005

"Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
news:42e64844$(E-Mail Removed)...
> cosmic foo wrote:
> > 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.
> >
> >
> >

> please dont cross post


?




 
Reply With Quote
 
Jedi Fans
Guest
Posts: n/a
 
      07-26-2005
cosmic foo wrote:
> "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
> news:42e64844$(E-Mail Removed)...
>> cosmic foo wrote:
>>> 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.
>>>
>>>
>>>

>> please dont cross post

>
> ?
>
>
>
>

dont post the same or similar message to multi newsgroups, as it wastes
peoples time...
 
Reply With Quote
 
cosmic foo
Guest
Posts: n/a
 
      07-26-2005

"Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
news:42e65451$(E-Mail Removed)...
> cosmic foo wrote:
> > "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
> > news:42e64844$(E-Mail Removed)...
> >> cosmic foo wrote:
> >>> 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.
> >>>
> >>>
> >>>
> >> please dont cross post

> >
> > ?
> >
> >
> >
> >

> dont post the same or similar message to multi newsgroups, as it wastes
> peoples time...


why, do you think everyone reads both html groups?


 
Reply With Quote
 
Jedi Fans
Guest
Posts: n/a
 
      07-26-2005
cosmic foo wrote:
> "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
> news:42e65451$(E-Mail Removed)...
>> cosmic foo wrote:
>>> "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
>>> news:42e64844$(E-Mail Removed)...
>>>> cosmic foo wrote:
>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>> please dont cross post
>>> ?
>>>
>>>
>>>
>>>

>> dont post the same or similar message to multi newsgroups, as it wastes
>> peoples time...

>
> why, do you think everyone reads both html groups?
>
>

if ur gonna do it adress both newsgroups at same time, so answers in one
are answered in another... do this by in newsgroup field [or w/e] in new
message "alt.html, other.newsgroup" w/o quotes
 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      07-26-2005
Jedi Fans <"news[at]jedifans[--=dot==-]com"> wrote:

>please dont cross post


But do snip quotes down to the bare minimum.

--
Spartanicus
 
Reply With Quote
 
cosmic foo
Guest
Posts: n/a
 
      07-26-2005

"Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
news:(E-Mail Removed)...
> cosmic foo wrote:
> > "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
> > news:42e65451$(E-Mail Removed)...
> >> cosmic foo wrote:
> >>> "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote in message
> >>> news:42e64844$(E-Mail Removed)...
> >>>> cosmic foo wrote:
> >>>>> 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.
> >>>>>
> >>>>>
> >>>>>
> >>>> please dont cross post
> >>> ?
> >>>
> >>>
> >>>
> >>>
> >> dont post the same or similar message to multi newsgroups, as it wastes
> >> peoples time...

> >
> > why, do you think everyone reads both html groups?
> >
> >

> if ur gonna do it adress both newsgroups at same time, so answers in one
> are answered in another... do this by in newsgroup field [or w/e] in new
> message "alt.html, other.newsgroup" w/o quotes


why did you say 'please dont cross post'?



 
Reply With Quote
 
Jedi Fans
Guest
Posts: n/a
 
      07-26-2005
cosmic foo wrote:

<SNIP>
>>>>>> please dont cross post
>>>>> ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>> dont post the same or similar message to multi newsgroups, as it wastes
>>>> peoples time...
>>> why, do you think everyone reads both html groups?
>>>
>>>

>> if ur gonna do it adress both newsgroups at same time, so answers in one
>> are answered in another... do this by in newsgroup field [or w/e] in new
>> message "alt.html, other.newsgroup" w/o quotes

>
> why did you say 'please dont cross post'?



as you posted the same question to two different newsgroups where in one
you may have gotten a reply which solved it and in the other you may not
have gotten a reply until much later on, but since it was already solved
it wasted the person's time in the second newsgroup... whereis if you
do the alt.html, other.newsgroup thing everybody sees all replies
 
Reply With Quote
 
Jedi Fans
Guest
Posts: n/a
 
      07-26-2005
Spartanicus wrote:
> Jedi Fans <"news[at]jedifans[--=dot==-]com"> wrote:
>
>> please dont cross post

>
> But do snip quotes down to the bare minimum.
>

fair enough, new to snipping as you can see...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to "jump the queue"...delay due to many thumbnail images Gary Hasler Javascript 12 02-19-2010 04:35 PM
how to change images based on action.Even clicking changed images should do respective actions? vj Javascript 3 01-12-2007 12:26 PM
Calculating propagation delay & transmission delay Stone Cisco 1 09-27-2006 06:26 PM
my cached dataset just wont stay cached!! Craig G ASP .Net 0 03-07-2005 10:02 AM
Delay while images are being cached? Donald Canton Javascript 0 07-02-2003 02:24 AM



Advertisments