Click here to Skip to main content
13,299,495 members (57,209 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,
how to disable browser back button?
Posted 18-Dec-12 18:34pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Christian Graus 18-Dec-12 23:43pm
This is useless. It's not possible to disable the back button
Krunal Rohit 18-Dec-12 23:57pm
Please take a look at online demo from given link.. :)
Christian Graus 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 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 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
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
Rate this: bad
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>

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171207.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2017
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