I have to count the number of active users.
The main problem is how to trace the users who just close the browser window. The session will still alive. In my application the session time out is 4 hours. We cannot reduce that.
The main requirement is to show the message "SYSTEM IS BUSY" when the number of users exceed a particular limit.
other wise trap the onclose event geneaqted by the browser and invalidate the session for that active user ,
but this not the soluiton ultimatly. u need to do the server side track
other wise implemnt the forcefully login when user close the browser ,
using onclose u can open the same page and ask him for log off , if u dont have the security filets.
Short: there's NO way to guarantee that a session on the server indeed has a browser associated with it, you always have to assume it has.
4 hour timeouts are excessive, 30 minutes is pretty much standard and busy sites may reduce that to 5-10 minutes only.
Originally posted by William Brogden:
I have used this approach with a self-refreshing page, first in a normal frame 1 pixel wide so it wont show, and then in an inline frame.
I didnt like the idea too much, but it was a must-have requirement, because the application license a placed a max-users limit.
One issue with this was that if the user opens up more than one windows, there are that many more 'heartbeats' going, leading to more network traffic that originally planned for.
Will using an applet instead of the periodically refreshing page in the frame provide any benefits?