[Zope] Re: Connected users
Tres Seaver
tseaver at zope.com
Thu Nov 4 17:20:08 EST 2004
Sean Hastings wrote:
> HTTP connections open - send a request - get a response - and close.
> users are only really "connected" during that brief period of time.
>
> If you want to create some other definition of "connected", you could check
> for time since the last request and decide that any user who has made a
> request in the last X minutes is still "connected".
>
> If you want to get really tricky, you could have your Zope pages return a
> document with frames, and have one of those frames contain an HTTP reload
> command which keeps hitting the sever ever X seconds to let you know that
> the browser is still open to your page. (The return to this request can even
> be used to generate pop up messages for "connected" users) But even this
> doesn't guarantee that your user is still there. He or she may have walked
> away from the computer, taken a cab to the airport, and gotten on a flight
> to Tonga. :-)
If you can tolerate the cost, you can also force your users to create
sessions, and then track how many of those are active; they eventually
time out, giving you a rough idea how many users are online.
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope
mailing list