05-08-2008, 05:40 PM
|
#4 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Quote:
Originally Posted by drewbee
If you set a cookie (or session), the session automatically destroys on browser close. By default, the cookie is only meant to stay alive for the life of the browser session (and usually 15 minutes of inactvity).
|
While that can be true for cookies (depending on the settings), that is not true for sessions. Sessions are stored on the server, the server has no way of knowing when you close your browser. Sessions are destroyed after a certain amount of time of inactivity.
You cant destroy a session when the browser closes. It requires a server side command to do close a session. Theoretically, you could have javascript make an ajax call to a script when the browser closes. Although I don't know if javascript can do this. While you can destroy the cookies that maintain the session ID's, they can be deliberately bypassed by modifying the cookies.
|
|
|
|