Quote Originally Posted by visualAd
Unless you use the XMLHTTPRequest object you cannot do it with Javascript. PHP includes a built in mechanism to dispose of stale sessions after a period of time has elapsed. Haves a look at the session.gc_maxlifetime, session.gc_probability, session.gc_divisor directives.

For examples when:

session.gc_divisor = 10
session.gc_maxlifetime = 300
session.gc_probability = 1

Sessions will be destroyed when active fo 5 mins (200 seconds) and the garbage collection (destruction) of these sessions will occur in 1 out of every 10 requests.
I already Set the Session Maxlifetime to 0
what do you mean by XMLHTTPRequest object ?

Quote Originally Posted by penagate
By default, the session cookie is destroyed when the browser window is closed, which effectively logs out the user.
Nop i can still see it on tmp folder

Quote Originally Posted by JRSofty
You can unset the $_SESSION variable but that only removes all the elements of the array
Can i unset the $_SESSION variable on the onunload of the page ?



Thanks !