Click here to Skip to main content
15,914,016 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i need to hid back button in browser
Posted
Comments
Herman<T>.Instance 15-Feb-12 5:58am    
mission impossible

i don't how to hide but if you got the solution i will definitely try it!
han , if you want to disable back button , have a look at the following url you will get some idea:
http://social.msdn.microsoft.com/Forums/eu/csharplanguage/thread/d560c40f-e835-4494-8fa6-1a64dbad1e6c[^]
 
Share this answer
 
v2
It is impossible to hide the back button. It is part of the browser UI and you do not control that.

There are various ugly hacks which attempt to make it unusable, most of which will result in your users wanting to punch you in the face, and likely switching to a less annoying competitor site.

What you should do is:

  • Generally, make your website back-button-tolerant. Most web pages are informational and can safely be cached, and the user may forget something and want to go back and look at a previous page.
  • Make sure any transactional stuff (i.e. requests that actually do something) happen via HTTP POST, so at least, if the user revisits one of those pages, they get the 'this will resubmit, are you sure' warning. Bonus points for having things execute in a POST which does its stuff and then uses a 303 redirect to a GET page so the history works nicely and the user can't accidentally resubmit stuff.
  • If there are pages which you really don't want users to go back to, then set them to not be cacheable, and in the page, check whether the application is in a valid state to show that page. But there should not be many of these. In anything less important than, say, an online bank (and I really hope someone writing one of those isn't asking this level of question), there should really be none.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900