Is it possible to detect \"idle\" time in JavaScript?
My primary use case probably would be to pre-fetch or preload content.
Idle time:
You could probably hack something together by detecting mouse movement on the body of the form and updating a global variable with the last movement time. You'd then need to have an interval timer running that periodically checks the last movement time and does something if it has been sufficiently long since the last mouse movement was detected.