The truth is that you can minimize the opportunity for a user to move backward in your site - but you cannot completely disable this functionality.
You can open a new window that doesn't have the back button, and display the content there (however, the user can right click and there is a BACK option on that menu). If you try to disable the right click menu, then the user will just hit the "backspace" key and that functions as the "back" button.
The point is that you can't prevent the user from going backward, so you have two options when dealing with sensitive information. Either close the browser window when the user exits the site, or warn the user that there may be security issues if they leave their browser open. Put the responsibility on their head if they don't close the browser.
Trollacious doesn't mean to be mean, but there have been a lot of questions lately about trying to disable basic browser functionality (or create popups that can't be killed, or change a users homepage without his/her permission, or etc. (you get the picture)). Designing for the web is a different programming experience and it takes a lot of thought on how to protect sensitive information from all the various security holes that a user can throw at it.
So the short answer is "no you can't disable the back button", but the real question is "why do you think you need to disable the back button? and can you change the content flow so that something like that isn't necessary?" Einstein47 (Love is like PI - natural, irrational, endless, and very important.)
I would agree that I haven't found any reliable way to prevent certain functions.
It is a fruitless effort to try, but there are options, such as a pop up and such, but be aware that each of these comes with a price. Some folks hate popups and will immediately close them or use a pop up killer.
I've been hammered by a few folks about a no right click on my site, there only as a reminder, not as prevention.
Point is, when you add theses things that alter a user's browser, it irritates them and they aren't likely to return.
It would be nice to have things where it is possible to set things up the way you want them, but realistically, you need to set things up for the user, as they will inevitably be the ones you wish to return to your site.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.