Re: Session deletion on window close?

From: Date: Tue, 22 Jan 2002 11:25:41 +0000
Subject: Re: Session deletion on window close?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-81519@lists.php.net to get a copy of this message
Uhhh? Closing a browser window, does definetly NOT delete the session. Closing a Browser Window simply does nothing on the Server-Side, so there's no command to delete a session executed. If someone manages to grab the sessionid (or the cookie) and opens the Page again, the session is still active. Neil is completely right, if he tries to generate a new GET-Request to a special log-out page on the server that uses session_destroy(). Well, I've no experence in using the window.onclose or document.onunload events with Netscape Javascript, but something like that should be the right way, if you need to be really save that a session is destroyed. Bruno "Nick Wilson" <nick@explodingnet.com> schrieb im Newsbeitrag news:20020122103458.GA3750@explodingnet.com... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > * On 22-01-02 at 11:30 > * Neil Freeman said.... > > > Does anyone have any suggestions as to how I could achieve the > > following: > > a) Browser window closed by user clicking on [X] > > No but I'm sure someone will. > > > b) 'Logging out' page opened (which handles the PHP session deletion). > > When a user closes the browser (any browser) the session is ended. You > don't need to manually terminate it. > > HTH > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE8TUBSHpvrrTa6L5oRAn45AJ4kltU6UKb+JCSamfgUfQ+e1CPIKACff0Xn > NlVo2ttprA1xjdLz6lB3DWg= > =BOV1 > -----END PGP SIGNATURE-----

« previous php.general (#81519) next »