Javascript image changer

S

Spartanicus

When using javascript [1] to display a different image (based on the
time of day) both IE and Moz re-execute the js when using the back
function to return to a page with the js on it, this results in users
having to load several images. Opera doesn't do this.

Is there a right or wrong regarding this UA behaviour?

Any way to avoid this?

[1] http://www.pan-europe.utvinternet.ie/script/random_image2.js
 
L

Lasse Reichstein Nielsen

Spartanicus said:
When using javascript [1] to display a different image (based on the
time of day) both IE and Moz re-execute the js when using the back
function to return to a page with the js on it, this results in users
having to load several images. Opera doesn't do this.

Is there a right or wrong regarding this UA behaviour?

No. There are no standards that say how browsers must behave when you
leave a page, or when you come back to it.

Opera keeps the page's state as long as it fits in memory, and allows
you to continue where you left it (I believe they clear password
fields for security, though). Other browsers reload the page from the
cache. Both are perfecly reasonable behaviors.
Any way to avoid this?

Use Opera :)

/L
 

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
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top