What is the idle time?
Idle time, sometimes referred to as waiting time, is the time lost due to work stoppages in which machines and/or employees are ready and available but can not be productive. It should not be confused with planned or unplanned downtime.
What is idle time in browser?
The idle time is the time that the user has no interaction with the web-page. It can be mouse movement, page click or when the user uses the keyboard. The idle time can be detected using either vanilla JavaScript or jQuery code.
How to detect idle time in js?
const timer = new IdleTimer(() => alert('idle for 1 minute'), 1000 * 60 * 1); timer. activate(); It does not depend on jQuery, though you might need to run it through Babel to support older browsers.