Is it possible to detect \"idle\" time in JavaScript? My primary use case probably would be to pre-fetch or preload content.
Idle time:
Well you could attach a click or mousemove event to the document body that resets a timer. Have a function that you call at timed intervals that checks if the timer is over a specified time (like 1000 millis) and start your preloading.