NetTalk Central

Author Topic: Delete session variables if user doesn't click logout  (Read 3178 times)

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Delete session variables if user doesn't click logout
« on: June 28, 2012, 07:56:07 PM »
Hello,

How can I delete the session values if the user does not click "log out" and
simply closes the browser?

TIA

Hector
« Last Edit: June 28, 2012, 08:19:01 PM by HPabon »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Delete session variables if user doesn't click logout
« Reply #1 on: June 29, 2012, 03:52:38 AM »
Hi Hector,

Firstly, logging out does not delete a session. It's just a logout. The Session only deletes when the "session time" expires. You can of course call delete session manually when the user logs out - alto ugh you can get into tricky situations doing that.

If the user turns off their browser, or navigates away from your app, or turns off their machine, or whatever, then you do not get any notification of that. In these cases the sessions are tidied up by the server after the session times out.

cheers
Bruce

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: Delete session variables if user doesn't click logout
« Reply #2 on: June 29, 2012, 06:54:27 AM »
Hi Bruce,

If the user turn of the browser, it means that variables simply are cleaned by itself?

If that the case, then there will be nothing to worry about some values stay in memory. Correct?

Regards

Hector


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Delete session variables if user doesn't click logout
« Reply #3 on: June 30, 2012, 03:46:01 AM »
correct