Caching prevents pages from changing.

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

    #1

    Caching prevents pages from changing.

    I have some javascript which allows a header, iframe and picture to be
    changed when the user clicks a next/previous button. In Opera, if you
    click next enough times to loop back to the start, or back to get to
    the previous one the the javascript fails. I have narrowed the problem
    down to Opera trying to load things from cache as it only happens when
    you go over a previously displayed iframe/image/header and if I clear
    the cache then you can do it all again.

    I have tried preventing caching using asp but to no avail.

    I have had no problems with the script in ie.

    it can be seen here if anybody wants to help me.



    Any help appreciated.

    Thanks

    Ian
  • Martin Honnen

    #2
    Re: Caching prevents pages from changing.



    Ian F wrote:
    [color=blue]
    > I have some javascript which allows a header, iframe and picture to be
    > changed when the user clicks a next/previous button. In Opera, if you
    > click next enough times to loop back to the start, or back to get to
    > the previous one the the javascript fails. I have narrowed the problem
    > down to Opera trying to load things from cache as it only happens when
    > you go over a previously displayed iframe/image/header and if I clear
    > the cache then you can do it all again.
    >
    > I have tried preventing caching using asp but to no avail.
    >
    > I have had no problems with the script in ie.
    >
    > it can be seen here if anybody wants to help me.
    >
    > http://www.ifdesign.co.uk/portfolio.asp[/color]

    Try changing

    <a href="#"><img src="images/prev_arrow.png" width="26" height="23"
    onClick="prev_p ortfolio_item() " border="0" alt="Previous"> </a>

    to

    <a href="#" onclick="return false;"><img src="images/prev_arrow.png"
    width="26" height="23" onClick="prev_p ortfolio_item() " border="0"
    alt="Previous"> </a>

    and

    <a href="#"><img src="images/next_arrow.png" width="26" height="23"
    onClick="next_p ortfolio_item() " border="0" alt="Next"></a>

    to

    <a href="#" onclick="return false;"><img src="images/next_arrow.png"
    width="26" height="23" onClick="next_p ortfolio_item() " border="0"
    alt="Next"></a>

    I hope that improves things.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Ian Fuller

      #3
      Re: Caching prevents pages from changing.


      Thanks for the help, that fixed it straight away. Fairly obvious now it
      has been shown to me... I guess its explorer that is actually 'breaking
      the law', cant say I'm surprised.

      Thanks again.

      Ian



      *** Sent via Devdex http://www.devdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...