Click here to Skip to main content
11,642,658 members (67,842 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi All,
how to disable browser back button?
Posted 18-Dec-12 17:34pm
amit_831.1K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Christian Graus at 18-Dec-12 23:43pm
   
This is useless. It's not possible to disable the back button
Krunal Rohit at 18-Dec-12 23:57pm
   
Please take a look at online demo from given link.. :)
Christian Graus at 19-Dec-12 0:01am
   
I know you can write code that seems to work. But, I can stop it from working. Making it useless. What good is security that only works when people want it to ?
Krunal Rohit at 19-Dec-12 0:17am
   
Ya I know question is uncertain but what we can do ? As question was asked, I've provided solution... Now it's up to 'em how they deal with it...
Christian Graus at 19-Dec-12 1:03am
   
You left someone with no idea what they are doing, with the impression that it's possible to defeat the back button in the browser. It is not, in any meaningful way. Sometimes the answer people want, is not the correct answer.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can't. Every solution anyone might give you, will only work for people who don't want to stop it working. To even try is idiotic. Fix your code so your site works, don't try to work around poor code with a hack that is easily defeated
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

try this javascript code will help you
<script language="javascript">window.onback=history.forward();</script>
  Permalink  

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

  Print Answers RSS
0 DamithSL 254
1 Sergey Alexandrovich Kryukov 204
2 OriginalGriff 160
3 Afzaal Ahmad Zeeshan 129
4 Mika Wendelius 85
0 Mika Wendelius 485
1 DamithSL 457
2 OriginalGriff 365
3 Afzaal Ahmad Zeeshan 258
4 Sergey Alexandrovich Kryukov 254


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100