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

Image object problem

P: n/a
Hi,

I currently have a piece of JavaScript which swaps the on-screen image
between two different versions, and I use:

document.images[i].src = something

and change the src each time. However, every time the script does the change
it goes to the internet to get the new image, even though it's had it
previously. This isn't ideal as the src change will be called tens of
thousands of times a day.

Any suggestions? Ideally I need two image objects which load once and then I
swap the screen image for one of these. But I don't know JavaScript well
enough.

TIA

--
Kev

Oct 8 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Kevin Stone wrote:
Hi,

I currently have a piece of JavaScript which swaps the on-screen image
between two different versions, and I use:

document.images[i].src = something

and change the src each time. However, every time the script does the change
it goes to the internet to get the new image, even though it's had it
previously. This isn't ideal as the src change will be called tens of
thousands of times a day.
Are you seeing this in IE? If so, google for "IE image cache bug"

--
Ian Collins.
Oct 8 '06 #2

P: n/a
>I currently have a piece of JavaScript which swaps the on-screen image
>between two different versions, and I use:

document.images[i].src = something

and change the src each time. However, every time the script does the
change
it goes to the internet to get the new image, even though it's had it
previously. This isn't ideal as the src change will be called tens of
thousands of times a day.
Are you seeing this in IE? If so, google for "IE image cache bug"
It is in my local IE, which I've changed the default cache, which seems to
explain it for me. And most other people won't have changed the defaulrt IE
setting I don't think it's a problem.

Cheers

--
Kev
Oct 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.