By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,775 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,775 IT Pros & Developers. It's quick & easy.

problems with images

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.