0

I am having a problem with my website. I have some animations when a redirect is happening to get a transition effect from page to page. The problem is that if a user clicks the Browsers Back button it goes to the previous page but it does not reset the animations so everything stays hidden as when you exited the page.

To have a demo of the error go to http://www.econtentsys.gr/affiliate/xenosk/temp/amigdalos/main.php , Click on About Me and then click on your browsers (history) Back button.

Is there anyway to reset the pages cache lets say every time the page gets showed so the transitions will always work ?

Only Google Chrome functions properly on me. All the other browsers are having the same error.

Thanks in advance.

braX
  • 9,702
  • 5
  • 16
  • 29
Xenos K.
  • 5
  • 3
  • possible duplicate of [Browser "Back" Button vs. jQuery-animated page](http://stackoverflow.com/questions/6215943/browser-back-button-vs-jquery-animated-page) – Shawn Chin Nov 17 '11 at 11:26
  • More duplicates: http://stackoverflow.com/q/3628459/ http://stackoverflow.com/q/1195440/ http://stackoverflow.com/q/158319/ – Shawn Chin Nov 17 '11 at 11:34

1 Answers1

0

Your animation doesn't reset when you click the back button because the page is cached in the bfcache (Back-Forward Cache).

The linked article mentions several situations where bfcache is not used, one being when the unload handler is uses. Therefore, the simplest approach would be to simple add an empty onunload attribute to your <body> tag, i.e.

<body onunload="">

p.s. I've only tested this in Firefox.

Shawn Chin
  • 74,316
  • 17
  • 152
  • 184