c# - How to get each web user's status is online or offline on server side ? -


when user close tab or browser means user can't online want manage status using online or offline status.

how status please solution.

assuming have authentication system can add new column person/account table datetime value. here can store timestamp when user last active. can update field using middleware. whenever user request new page can update timestamp in database. decide if user online have take range in seconds assume user online, if user requested page 10, 20 , 30 seconds ago can assume user online.


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -