# Detecting if the User is Idle or Inactive

**URL:** <https://forum.kirupa.com/t/detecting-if-the-user-is-idle-or-inactive/331640>\
**Category:** web dev\
**Created:** [September 15, 2013, 9:40pm UTC](https://forum.kirupa.com/t/detecting-if-the-user-is-idle-or-inactive/331640 "2013-09-15T21:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [September 15, 2013, 9:40pm UTC](https://forum.kirupa.com/t/detecting-if-the-user-is-idle-or-inactive/331640/1 "2013-09-15T21:40:38Z")

</div>

[http://www.kirupa.com/html5/detecting\_if\_the\_user\_is\_idle\_or\_inactive.htm](http://www.kirupa.com/html5/detecting_if_the_user_is_idle_or_inactive.htm)

A simple script that allows your app to do something if your users aren’t interacting with it after a period of time. Netflix does this…as I found out when I fell asleep in-between episodes of Grey’s Anatomy. I think Netflix automatically plays through two episodes before pausing if it detects you haven’t interacted with the app.

:pa:
