Image object problem

K

Kevin Stone

Hi,

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

document.images.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
 
I

Ian Collins

Kevin said:
Hi,

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

document.images.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"
 
K

Kevin Stone

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

document.images.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top