471,596 Members | 941 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,596 software developers and data experts.

problems with images

hi
i have written a code in javascript and this code create lots of images
at run time.
Whenever page loads all these images get downloaded as 90% of images
are same
So is there any way so that the images doesnt get dowloaded every time
rather if page load has 300 images then only distinct images get
downloaded all other are getting displayed by taking images from cache.
pls suggest me solution as early as possible..

Jan 20 '06 #1
4 1135
VK

Navu wrote:
i have written a code in javascript and this code create lots of images
at run time.
Whenever page loads all these images get downloaded as 90% of images
are same
So is there any way so that the images doesnt get dowloaded every time
rather if page load has 300 images then only distinct images get
downloaded all other are getting displayed by taking images from cache.
pls suggest me solution as early as possible..


You don't need to do anything as it's part of browser caching
mechanics. If you have a picture located say at
http://www.myserver.com/images/image001.jpg then such image will be
loaded only once and next time will be taken from cache.
I'm talking of course about average standard conditions (browser
caching is not disabled, it's a static image and not a server generated
with randomized URL, and not this... and not that... and too long to
list and irrelevant to the common case).

Jan 20 '06 #2
On 2006-01-20, Navu <na**********@gmail.com> wrote:
hi
i have written a code in javascript and this code create lots of images
at run time.
Whenever page loads all these images get downloaded as 90% of images
are same
So is there any way so that the images doesnt get dowloaded every time
rather if page load has 300 images then only distinct images get
downloaded all other are getting displayed by taking images from cache.
pls suggest me solution as early as possible..


ensure that identical images have identical src attributes
that should do it.

Bye.
Jasen
Jan 21 '06 #3
Even the src of images is same
even then if i will refresh the page then it will download every image.

Jan 23 '06 #4
Navu wrote on 23 jan 2006 in comp.lang.javascript:
Even the src of images is same
even then if i will refresh the page then it will download every image.

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 23 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Nigel Gomm | last post: by
3 posts views Thread by Scott | last post: by
3 posts views Thread by John Tacke | last post: by
2 posts views Thread by BluDog | last post: by
1 post views Thread by baroque Chou | last post: by
34 posts views Thread by aljamala | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.