Because there is absolutely no way for PHP to know that the user has
closed the browser window. Nothing is sent from the browser to the server
on a window close. By using session cookies (cookies without a specified
expiry time) the session is effectively ended since the cookie is gone
once the browser has been completely shut down (not just a window). When
that user comes back to the site after starting their browser again they
will get a new session.
On Thu, 5 Sep 2002, Raphael Hamzagic wrote:
> I'm just wanna know why the session doesn't end when the user closes the
> browser window and how can i make it.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php