Help centre

Answer

What is the Idle Detection API?

Short answer

The Idle Detection API lets a page detect, with the user’s permission, whether they have been idle (no keyboard/mouse/touch activity) for a specified threshold or have locked their screen — commonly used by chat and collaboration apps to automatically show an "away" status. It requires an explicit permission prompt and is supported on Chromium browsers only.

By InstantPWA engineering·Reviewed July 25, 2026

How it works

IdleDetector.requestPermission() then new IdleDetector() with a "change" event reporting userState ("active"/"idle") and screenState ("locked"/"unlocked").

Privacy safeguards

Requires explicit permission, only reports coarse idle/active state (not raw input), and cannot be used to fingerprint typing behaviour.

Support

Chromium (Chrome, Edge) only as of 2026; not implemented in Safari or Firefox.

Related
What is the Screen Wake Lock API?
The Screen Wake Lock API lets a page request navigator.wakeLock.request("screen") to prevent the device screen from dimming or auto-locking while the page is active — useful for recipe apps being followed hands-free, presentation tools, or video calls. The lock automatically releases when the tab is hidden or closed.
What is a PWA?
A PWA (Progressive Web App) is a regular website that meets three technical criteria — HTTPS, a Web App Manifest and a service worker — so browsers let visitors install it on their home screen. Once installed, it launches like a native app, works offline and can send push notifications.
What is the Web Locks API for?
The Web Locks API lets scripts across multiple tabs, workers or a service worker of the same origin coordinate exclusive or shared access to a named resource, so only one context runs a given operation at a time — for example, preventing two open tabs of a PWA from both triggering the same background-sync network request simultaneously.
What is the app install banner (mini-infobar)?
The mini-infobar is a small automatic prompt Chrome for Android can show at the bottom of the screen once a site meets install criteria and engagement heuristics, offering a one-tap install without opening the browser menu. Developers can call preventDefault() on the beforeinstallprompt event to suppress it and instead show their own custom "Install" button, triggering the native dialog later at a more relevant moment.
Is a responsive website the same as a PWA?
No, they solve different problems. Responsive design means your layout adapts to different screen sizes using CSS (media queries, flexible grids). A PWA is about adding installability, offline support and push notifications through HTTPS, a Web App Manifest and a service worker. A site can be responsive without being a PWA, and in principle a PWA could be built without fully responsive layout, though in practice almost every PWA is also responsive.