Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to disable the back button?  RSS feed

 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSF app where I want to allow the cache to function until the user clicks logoff. Once they do that, I don't want them to be able to use their back button to see the previous page.

In other words, before they press the logoff button I need the page to have this:

<meta content="no-cache" http-equiv="Cache-Control"/>
<meta content="no-cache" http-equiv="Pragma"/>

And after they press the logoff button make it look like this:

<meta content="no-cache" http-equiv="Pragma" >
<meta content="now" http-equiv=Expires>

How can that (or something like it) be done?

THANKS!
[ November 23, 2005: Message edited by: Darrin Smith ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!