Problem with Sessions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swethak
    New Member
    • May 2008
    • 118

    Problem with Sessions

    Hi,

    I done the login page. In that i store the username and passwords in sessions.It works fine.But i want to change my login page code as
    "When we close the browser the login page will automatically logout especially for Mozilla."

    How can i resolve that problem.I am facing this problem from long days.Its urgent.Anybody please help to that problem.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by swethak
    Hi,

    I done the login page. In that i store the username and passwords in sessions.It works fine.But i want to change my login page code as
    "When we close the browser the login page will automatically logout especially for Mozilla."

    How can i resolve that problem.I am facing this problem from long days.Its urgent.Anybody please help to that problem.
    Because sessions are as they suggest - they remain while the session is open, i.e. the browser is open (assuming there is some activity that keeps the session alive, also).

    Anyway, cookies are stored in the browser, so the user can close the browser and, if the cookie has a long enough lifetime, then the cookie will be available when the user returns.

    Comment

    • TheServant
      Recognized Expert Top Contributor
      • Feb 2008
      • 1168

      #3
      Not only are your sessions destroyed with no activity (Like when a user closes a browser) but when they come back to your site after opening the browser again, they will be given a new session. So you should be pretty safe with sessions. Recording whether a user is still online or not is a little more tricky, but I don't think that's what you want?

      Comment

      Working...