How to handle Browser back button event

Hi friends,

I have one requiremnt,i.e, How to handle the browser back button event, when User click on the Browser Back button, i need to redirecting the our custom page, i.e Error page.

If any one know please tell, it is very urgent for me.

Thanks and Regards

Swamy VNVS

You web site breaks the expected use of the browser’s back button? That is a problem.

For security reasons, scripting is not allowed to change the browser history.
If you absolutely must clear the history for a page, ensure that the page is opened as a new window, so that no previous page is set.