I want to detect browser back button in java-script/jquery without using any external plugins.
I am going to support following browsers
IE8,IE9,FireF
That can be simply dropped into your web page, and when the user clicks back, it will call a function. The default function on this call is a javascript alert “Back Button Clicked”.
To replace this functionality, you simply need to override the OnBack function. This can be done by using the code below.
This will now replace the “Back Button Clicked” alert with a “You clicked it!’” alert.
support following browsers
IE8,IE9,FireFox,Chrome
Browser Back Button Detection
Or using jquery
Catching browser back
Using standard javascript
Mastering The Back Button With Javascript