'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)? -- Christoph M. Becker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php