Re: close the browser

From: Date: Tue, 24 Jun 2014 18:53:00 +0000
Subject: Re: close the browser
Groups: php.general 
Request: Send a blank email to php-general+get-323541@lists.php.net to get a copy of this message
On 24 Jun 2014 at 17:43, Stuart Dallas <stuart@3ft9.com> 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

« previous php.general (#323541) next »