Re: Re: pulling script in interval of second.

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

 



On 1 July 2014 22:26, Christoph Becker <cmbecker69@xxxxxx> wrote:

> 'stuart Dallas' wrote:
>
> > On 1 July 2014 21:36, Aziz Saleh <azizsaleh@xxxxxxxxx> 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)?
>

The unreliability of using this method has already been pointed out to the
OP in a previous thread.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

[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