Solved

Disable the Back button of the browser

Posted on 1999-01-28
6
160 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
  • 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now