Skip to Content
Platform.Ontology

Idle Detection

Tells a site when the person is away from keyboard and mouse or the screen is locked.

Asks you firstNotifications and backgroundKeep awakeWeb browsersWhile you use it

In one line

Can tell when you step away or lock your screen, if you allow it

Tells a site when the person is away from keyboard and mouse or the screen is locked.

Reveals when the person is present: active or idle (at least 60 seconds) and whether the screen is locked. Useful for chat presence; also shows daily schedule, sleep and work hours.

What it can and can't do

What the user does: You tap a button like Show my status and tap Allow

It can

  • See whether you are active or idle for at least 60 seconds
  • See if your screen is locked
  • Show presence in chat or reset a shared kiosk
  • Keep checking while the page is open

It cannot

  • Work before you tap Allow in Chrome
  • Work in Firefox, Safari or on iPhone
  • Work on Samsung Internet
  • See what you are doing, only whether you are active or away

How it differs between platforms: Chrome and Edge on computers and Android ask first. Firefox, Safari and iPhone browsers do not support it.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported942021-09-21None
EdgeSupported1142023-06-02None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported942021-09-21None
Samsung InternetNot supportedNot availableNot listedNone

How a site asks for it

APIIdleDetector.requestPermission(); new IdleDetector().start({threshold: 60000}); userState, screenState
Permission nameidle-detection
Permissions policyidle-detection
Browser compat keysapi.IdleDetector
How access is grantedprompt
What the user seesChrome prompt Know when you are actively using your device, Allow or Block; needs a user gesture.
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsPersistent per origin
How to take it backSite settings, padlock
Inside an iframeNeeds allow="idle-detection" in iframes

Typical flow

  1. User gesture
  2. IdleDetector.requestPermission()
  3. Prompt shown
  4. start({threshold}) then 'change' events fire

Data you get

What comes back: User and screen state
Shape: event
How often: on state change

FieldTypeUnitRangePrecision
userStateenumnoneactive or idleafter threshold
screenStateenumnonelocked or unlockedevent
thresholdintegerms60,000 minimum1 ms

Technical limits

  • 60 second minimum threshold
  • Chrome only
  • Needs gesture

The story

What it is

A site can learn when you step away from the keyboard and mouse or lock your screen.

For you

A prompt asks to know when you are idle. If you allow it, the site can show you as away in chat or pause things. You never see the checks themselves.

For makers

Makers use it to show presence in chat and team tools, and to save resources. It is also a window into when you are at your desk. That is why it needs a clear allow.

Where you see it

TypeExampleApps
messagingA web chat shows a friend as Away after they leave their computer, so you know not to expect a reply.Slack, Discord
enterpriseA shared support desk marks agents as idle and sends new tickets to those at their desks.None named
gamesA browser game lobby pauses a match search when you walk away, so teammates are not left waiting.None named
liveA live auction site logs out an idle bidder to protect their account.None named
securityA banking site locks the page when it sees the device screen is locked and idle.None named
educationA test platform notes that a student has left their screen, as a sign of cheating risk.None named
videoA video site pauses autoplay of the next episode when no one is there to watch.None named

Risks

  • Shows when you are away
  • Can feel like spying

What the platform says

Good uses and abuse

Legitimate uses

  • Chat presence
  • Kiosk reset

Known abuse

  • Learning when the person is away from the computer

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2021-09, Chrome 94: Idle Detection ships

Sources

How well checked: Based on official documentation.

On this page