How do i detect if the user is “idle” with javascript?

后端 未结 4 1397
忘掉有多难
忘掉有多难 2020-12-17 23:05

I\'m developing a \"real-time\" web application which sends AJAX requests to the server every 10 seconds. Obviously this is very bandwidth-intensive and I would like to know

4条回答
  •  甜味超标
    2020-12-17 23:25

    Here's another way: http://www.tek-tips.com/faqs.cfm?fid=2700
    And using Jquery : http://www.bedroomlan.org/coding/detecting-%E2%80%98idle%E2%80%99-and-%E2%80%98away%E2%80%99-timeouts-javascript

提交回复
热议问题