coderef

Screen wake lockBaseline · Newly available

The navigator.wakeLock.request("screen") API prevents the device's screen from dimming or being turned off.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Mar 31, 2025.

Browser support

DesktopChrome
1–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155
Edge
12–83Not supported
84+Supportedsince Jul 16, 2020
Current: 154
Firefox
1–125Not supported
126+Supportedsince May 14, 2024
Current: 157
Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27
MobileChrome Android
18–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155
Firefox Android
4–125Not supported
126+Supportedsince May 14, 2024
Current: 157
Safari iOS
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Mar 31, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: wakeLock.

Feature detection

JS · check before using
if ("allow" in document.createElement("iframe")) {
  // the allow attribute/property of <iframe> is supported
}

Sub-features

Support for each part of the feature (11). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Navigator.wakeLock848412616.48412618.4
Permissions.permission_screen-wake-lock848412616.48412616.4
WakeLock848412616.48412618.4
WakeLock.request848412616.48412618.4
WakeLockSentinel848412616.48412618.4
WakeLockSentinel.release848412616.48412618.4
WakeLockSentinel.release_event848412616.48412618.4
WakeLockSentinel.released878712616.48712618.4
WakeLockSentinel.type848412616.48412618.4
iframe.allow.screen-wake-lock848412616.48412616.4
http.headers.Permissions-Policy.screen-wake-lock8888✕✕88✕✕