I want to get user idle time when i have try to get any script but mostly script are working on same browser tab where script open but i need across all tabs.
Asked
Active
Viewed 90 times
2 Answers
0
Try using PHP.. A small trick you can follow is store the time stamp based on users session id and update the time stamp when he remakes the request..
Like what I meant to say is, store session id and timestamp when user currently visits and update the timestamp when he revisits or makes another action on the page.. by this you can know how much time user was idle between actions.
Hope it makes sense and is what you are looking for.
Thanks! Have a nice day!

UJP
- 41
- 1
- 7
-
for example if one tab is open and i am working on other tab then program should give correct time. becuase i have tried different scenarios when i was on page then find correct time when move to other tab then donot find correct. – Testing SWT Nov 14 '17 at 17:31
0
You can start a counter and each x seconds (or send it when leaving the page) send an ajax post to the server where you can collect this data using a session.

ARN
- 679
- 7
- 15