Is it possible to detect \"idle\" time in JavaScript?
My primary use case probably would be to pre-fetch or preload content.
Idle time:
I know it a relatively old question, but I had the same issue and I found a quite good solution.
I used: jquery.idle and I only needed to do:
$(document).idle({
onIdle: function(){
alert('You did nothing for 5 seconds');
},
idle: 5000
})
See JsFiddle demo.
(Just for Info: see this for back-end event tracking Leads browserload)