Reputation: 18265
I have got two scenarios:
user accesses to page A; then click on a link to go to page B; click back button to go back to page A;
user accesses to page A; then click on a link to go to page B; click on another link to go to page A;
I need a particular behavior to happen when the user is back to page A clicking the back button. Is that any way to do that in all the browsers. If I bind a function to "beforeunload" event in page B, the event is triggered in whatever way I am leaving the page.
Upvotes: 0
Views: 2817
Reputation: 9491
I had almost the exact same question I think this is what you need https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history
Upvotes: 1