GLOBAL.ASA real active user count

D

Daniel L.

Hi,

I've searched over 1 hour on Google and elsewhere and haven't found
anything.

I'd like to find a way to get the real active user count on our website.
THe main problem I have is when a user quit with the "X" the counter will be
decremented of 1 only when the Session.Timeout will be expired.

Please let me know if anyone have come accross a solution somewhere...

Thank you!
 
T

Tom B

You'd have to be creative. Likely on the client-side.
Perhaps, a little javascript function that refreshes an "image" every X
seconds.
If a user fails to refresh their image, they are "timed out"

The other thing, if you are stuck with server side only, would be to track
users separately. Users who have been active in the last X seconds and
users who are still "logged in" but haven't been active.
 
M

Manohar Kamath [MVP]

That's the problem with the basic HTTP protocol itself, since it is not a
stateful protocol. Once the user gets a document, the user gets
"disconnected." The whole idea behind the session is that, using cookies and
a timer, you see if the user is connected within a certain time span.

With that said, there is no accurate way of figuring out an accurate count
of users -- what you are doing currently seems to do the job. There are
elaborate methods -- for example, embedding a small Java applet in a
invisible frame, which send out a message back to the server. But I think it
is an overkill for a simple counter app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top