Re: close the browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 Jun 2014 at 17:43, Stuart Dallas <stuart@xxxxxxxx> wrote: 

> I'm yet to hear of a legitimate reason to want some PHP to execute when
> a user closes the browser, so chances are there's a better way to achieve
> what he actually wants.

I use that in my app. If the user has been typing into an editing window, and then closes the browser window, they will expect that what they typed will show up again when they restart the app. I use the onbeforeunload event in the browser to handle this, along with a (rare) synchronous ajax request to run a PHP termination script.



--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux