While we are developing any web application then some times it's necessary to disable the back button effect from the browser. This is common in banking websites and other sites where security is major concern. User may hit the back button from the browser and forget to log out from the site. There fore it's required to disable browser's back button. So here is the code which will prevent user to go back on previous page.