• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Expiring session

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic