Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Timing out the Session on Clicking The Browser Back Button  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Timing out the Session on Clicking The Browser Back Button
 
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by kunal:
Timing out the Session on Clicking The Browser Back Button



Its a javascript and HTM related question, so please post it here(http://www.coderanch.com/forums/f-20/HTML-JavaScript) for better response
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to HTML and Javascript forum...
 
Author and ninkuma
Marshal
Posts: 66727
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Please fix your name -- it's not "legal" according to forum guidelines (and Eric will beat you up about it before much longer).
2) Even though this is not Jeopardy, please phrase your post in the form of a question that can be answered.
thanks,
bear
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Stated before you name doses not fit the guidelines of First and Last Name, Please use the My Profile link above tp fix it.
Second off I am guessing that you have a log out link and then the person uses the back button and they are logged in again and you do not want it.
This would be a server side problem with your session cookies being properly handled.
Eric
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before sending the data to the browser, write the following statements,
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
This also helps in case, when user should not be able to see previous pages by clicking the Back button in the browser. (When very sensitive information is being displayed and someone else comes back tomachine and tries to see what data was entered)
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!