This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Preventing to go to the previous screen by clicking on browser back button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Preventing to go to the previous screen by clicking on browser back button" Watch "Preventing to go to the previous screen by clicking on browser back button" New topic
Author

Preventing to go to the previous screen by clicking on browser back button

Krish Yeruva
Ranch Hand

Joined: Sep 17, 2008
Posts: 58
Hi,
How do I prevent a user from clicking the back button and going back to the previous screen once he "Sign Out" in HTML(Without disable the back button of the browser)?

I tried to do the same by writing the following code inside <head></head> tags in html.


<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Cache-Control" content="no-cache" />

But it is not working in any browser. So please help out regarding the same.


Thanks in Advance




Thanks & Regards
KITTU
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Have you tried the forum search?

It has been asked a bunch of times in the past.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Preventing to go to the previous screen by clicking on browser back button