Solved

Disable the Back button of the browser

Posted on 1999-01-28
6
200 Views
Last Modified: 2010-04-09
I am using ASP, with vbscript. I want to know a way to disable the back key of the browser ( IE3 +).
2nd part of the question is I would like it to be disabled only if I am abc.asp and it reactivate if traverse to other pages from abc.asp. If I come back to abc.asp the back should get redisabled.
0
Comment
Question by:anuravi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:PBall
ID: 1845777
Nosiree.. No can't do that.

Button might not be on screen, but people can still press Alt+<- or right click and click Back.

uh uh.
0
 
LVL 3

Author Comment

by:anuravi
ID: 1845778
No Sir,
I have seen some sites where I go to and cannot click the back button to get back to the calling page???

0
 
LVL 6

Expert Comment

by:PBall
ID: 1845779
Are those pages called on a different window?

0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 8

Accepted Solution

by:
jhurst earned 50 total points
ID: 1845780
You can stop the back from working by including a
<meta http-equiv="refresh" content="0; url=the_real_page">
at the start of a copy of the page that you want to disable the back button in.

So for example, if your page is called dog.htm you would place the above code in the dog.htm except that the url= would become url=cat.htm.

Now, when the user selects dog he is immediately re-directed to cat.  If he hits a back in cat he will arrive at dog, but this will send him straight to cat again.  So he can not get back.  

This is why most people who use the <meta will set a refresh time greater than 0 so that people can go back.
0
 
LVL 3

Author Comment

by:anuravi
ID: 1845781
Jhurst,
I guess you are making sense. Thank you very much for providing such beatiful answer. I would try this approach and if I have question would post the question again.
Thanks

0
 
LVL 3

Author Comment

by:anuravi
ID: 1845782
Pball,
If you see jhurst's message, you would get what I am meant by asking the question. Probably my question was misleading...
Thanks.

0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question