• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Expiring session

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Can any1 help me for...
deactivation of back button of browser ....when I click signout...in my JSP page...

or session should expire when I clicked back Button of browser...

Its my kind request...I am not getting solution for this...

Please...

 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ganesh,
You cannot disable the back button.

You can set all pages to no-cache and then not repaint them if the session is invalid (after the user signed out)
 
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a trick to disable the back button somewhere some time ago. But it was a very bad trick but still I would like to mention it. In that you open the new page in a new window or tab and then close the current tab or window using javascript. I know this is very weird but well it is a solution
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not change the client environment and the default user experience. Period.

Just code your application well.
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can consider, disabling the caching of a page in the browser. For doing so, see this: https://coderanch.com/t/414250/JSP/java/back-button#1826301
Once this is done, any back button would result in the page being fetched from the server, and in the server you can handle your requirement, like invalidating the session(if it exists) and creating a new one.
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic