Disable the Back button of the browser

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.
LVL 3
anuraviAsked:
Who is Participating?
 
jhurstConnect With a Mentor Commented:
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
 
PBallCommented:
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
 
anuraviAuthor Commented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
PBallCommented:
Are those pages called on a different window?

0
 
anuraviAuthor Commented:
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
 
anuraviAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.