Javascript image changer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Spartanicus

    Javascript image changer

    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...ndom_image2.js

    --
    Spartanicus
  • Lasse Reichstein Nielsen

    #2
    Re: Javascript image changer

    Spartanicus <me@privacy.net > writes:
    [color=blue]
    > 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?[/color]

    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.
    [color=blue]
    > Any way to avoid this?[/color]

    Use Opera :)

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...