Re: Re: pulling script in interval of second.

From: Date: Tue, 01 Jul 2014 21:26:22 +0000
Subject: Re: Re: pulling script in interval of second.
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-323581@lists.php.net to get a copy of this message
'stuart Dallas' wrote: > On 1 July 2014 21:36, Aziz Saleh <azizsaleh@gmail.com> wrote: > >> Do the onunload, and add a check in you PHP (store the info in the DB) >> that if the user doesn't refresh within 2 seconds (enough time to navigate >> to a different page on the domain), then mark as out. >> > > That's nasty. There should be Javascript attached to any event that might > change the page, that checks where that event is taking the user and is > enabling/disabling the onbeforeunload accordingly. PHP should not be > involved in that logic in any way. And what if no beforeunload event is triggered (for instance, because the browser is crashing or it simply doesn't implement the event)? -- Christoph M. Becker

« previous php.general (#323581) next »