aspose file tools*
The moose likes JSP and the fly likes Disable browser back button and refresh  in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Disable browser back button and refresh in jsp page

Shrawan Bhageria
Ranch Hand

Joined: Jun 20, 2005
Posts: 52
Hi All,

how to disable browser back button and refresh in jsp page


Regards,
Shrawan
Deepak Tewari
Greenhorn

Joined: Aug 04, 2005
Posts: 10
Hi,
see disabling the back button permanently i have not tried and no idea,
and any javascript validation will be short term solution which can be breached easily,and but what i have done in my application is ,not allow user to go back after
logout this can done using no cache tags and checking the session of user on each page so if loged out and trying to go back he will be thrown out of the application,
one more thing on the log out page that between the click of the logout ie after session is killed and the logout page put one blank html with onload
return forward so that logout page will not allow user to go back.


Deepak Tewari
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Originally posted by Shrawan Bhageria:

how to disable browser back button and refresh in jsp page


See the HTML forum for the 17 million times this has been asked in the past.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

"Deepak Tewari (Deepak)",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. To comply, all you need to do is to remove the "(Deepak)" from your display name.

Thanks!
bear
JavaRanch Sheriff
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Disable browser back button and refresh in jsp page