ratWonder
asked on
Reload previous page on "back" button.
Hello JS gurus.
Do you know if there's any way, using JavaScript, to ensure that when the back button is pressed, the previous page (history.go(-1)) is *reloaded* for *all users*, rather than just loaded from the cache?
I thought it might be possible to put JavaScript into the page that would reload it if it was reached by pressing the back button, but I have no idea how to detect if this is the case.
Any help would be most appreciated.
Robin.
Do you know if there's any way, using JavaScript, to ensure that when the back button is pressed, the previous page (history.go(-1)) is *reloaded* for *all users*, rather than just loaded from the cache?
I thought it might be possible to put JavaScript into the page that would reload it if it was reached by pressing the back button, but I have no idea how to detect if this is the case.
Any help would be most appreciated.
Robin.
ASKER
Sorry I didn't understand that.
I tried preventing the browser from caching by adding:
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
But no joy - when I click back it still shows the old version of the page.
I tried preventing the browser from caching by adding:
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
But no joy - when I click back it still shows the old version of the page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
You can expire the page and use POST for one