Back to Content

Permissions-Policy: idle-detection directive

files/en-us/web/http/reference/headers/permissions-policy/idle-detection/index.md

latest1.1 KB
Original Source

{{SeeCompatTable}}

The HTTP {{HTTPHeader("Permissions-Policy")}} header idle-detection directive controls whether the current document is allowed to use the {{domxref("Idle Detection API", "Idle Detection API", "", "nocode")}} to detect when users are interacting with their devices, for example to report "available"/"away" status in chat applications.

Specifically, where a defined policy blocks use of this feature, {{domxref("IdleDetector.start()")}} calls will return a {{jsxref("Promise")}} that rejects with a {{domxref("DOMException")}} of type NotAllowedError.

Syntax

http
Permissions-Policy: idle-detection=<allowlist>;
  • <allowlist>

Default policy

The default allowlist for idle-detection is self.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also