RE: [PHP] php-javascript-html

From: Date: Wed, 06 Dec 2000 18:25:23 +0000
Subject: RE: [PHP] php-javascript-html
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28947@lists.php.net to get a copy of this message
You can't. once the page is on the browser, you've lost your connection to the server. One possible solution would be to redirect the user to a page, upon leaving your page, that would destroy the session. That doesn't help though if a user types in another URL. in that case, the only way to get rid of the session is to have it timeout. One POSSIBLE solution (I've never seen this done, but it should work) would be to use the JavaScript onPageUnload method. Check and see if the new URL the user is going to is off your site. If it is, open a new (very small) window using JS and point it to a page that will destroy the current session and then close itself. We've use the concept of child windows for background processing (we call it "Poor mans' threading") in our application but never in this manner. Hope this ramble helps, Cal -----Original Message----- From: Bravo, David (CORP, MTC) [mailto:David.Bravo@gemmc.ge.com] Sent: Wednesday, December 06, 2000 11:33 AM To: php-general@lists.php.net Subject: [PHP] php-javascript-html How do I destroy a session <?php session_destroy() ?> when I leave a page??? I know I may use javascript... Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#28947) next »