Re: detect user click "stop" button in browser

From: Date: Thu, 22 Jun 2006 23:30:03 +0000
Subject: Re: detect user click "stop" button in browser
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-238526@lists.php.net to get a copy of this message
On Thu, June 22, 2006 4:16 am, weetat wrote: > Can we detected if user have clicked the "X" button in browser or > close browser ? > I have tested in my php program ,when i click "X" in IE6 , the > execution did not stop , it still running . > Any ways to stop the program execution when user click the "X" > button > or close browser ? There is no RELIABLE way to do that. An javascript thingie for "onStop" if it exists might help. PHP's ignore_user_abort being on/off can sometimes pass back their "stop" action, or not... I suspect that the return value from feof('php://stdout') *MIGHT* maybe change to FALSE when Apache recognizes that the browser is "gone"... But 100% reliable way probably does not exist, afaik. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#238526) next »