RE: [PHP-DB] finding out if a user left our website ?

[email protected] ("Daevid Vincent")
Newsgroups php.db
Message-ID <[email protected]>
> -----Original Message-----
> From: Vinay Kannan [mailto:[email protected]] 
> 
> Wanted to know if there is a way for us to find out, when a 
> user moves away
> from our website( closing the window and entering a different 
> url in the address bar )
> 
> closing the window i guess, we could use the javascript 
> onclose or something
> similar but for the user moving away from my website by 
> entering a different URL is what i would like to be 
> able to find out.

Yeah. You and everyone else on the web... ;-)

Not possible really. The web (by design) is stateless. This is the same
reason that you can't cancel a long running mySQL query if someone hits
"Stop" in the browser or leaves the page (and your mySQL server will
happily keep churning away and then try to return the data to a
non-existant page). It's sort of a "fire and forget" system.

Best you can hope for is to keep updating a timestamp to know how long
they've been there (and an auto-logout after some amount of inactivity).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.