Track when user hits back button on the browser

Question :

Track when user hits back button on the browser,

Answer :

Is it possible to detect when the user clicks on the browser’s back button?

I have an Ajax application and if I can detect when the user clicks on the back button I can display the appropriate data back

Any solution using PHP, JavaScript is preferable. Hell a solution in any language is fine, just need something that I can translate to PHP/JavaScript

Edit: Cut and paste from below:

Wow, all excellent answers. I’d like to use Yahoo but I already use Prototype and Scriptaculous libraries and don’t want to add more ajax libraries. But it uses iFrames which gives me a good pointer to write my own code.

Read More  Use-cases for reflection

,

One of my favorite frameworks for doing this is You register events and it calls you back when the user returns Back to that state. And if you want to learn how it works,  when designing it.

That’s the answer Track when user hits back button on the browser, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you

Read More  Select all columns except one in MySQL?