Is there a way to detect inactive time of a user in a website? (Idle time)

977 Views Asked by At

This is my approach : I reserve last time that a user post a postback to server in a session and in every postback subtract this value from current value. Is there a better way for this? I think that my approach haven't a good performance.

1

There are 1 best solutions below

0
On

If you are using in process sessions, there is an event that is fired when the session times out.

In the end anything like this involves regularly looking at the difference between the current time and the last recorded activity in the session.