Skip to content

Screen Wake Lock support

Published

The Screen Wake Lock API lets a page request that the device’s screen stay on and not dim or lock. The browser releases the lock automatically once the document becomes hidden, so a page must reacquire it after the user returns.

  • Legend
  • Yes
  • Partial
  • Flag
  • No
  • Unknown
Browser / PlatformSupportVersionsConfidenceSourceNotes
Chrome (Desktop)Yes84highsource—
Chrome (Android)Yes84highsource1
Edge (Desktop)Yes84highsource2
Firefox (Desktop)Yes126highsource—
Firefox (Android)Yes126highsource3
Safari (macOS)Yes16.4highsource—
Safari (iOS)Partial16.4 → 18.4highsource4
Samsung InternetYes14.0highsource5
WebView (Android)Yes84highsource6
OperaYes73lowsource—
  1. Derived by browser-compat-data mirroring from Chrome.
  2. Derived by browser-compat-data mirroring from Chrome.
  3. Derived by browser-compat-data mirroring from Firefox.
  4. Does not work in standalone Home Screen Web Apps. See bug 254545 (https://webkit.org/b/254545#c32).
  5. Derived by browser-compat-data mirroring from Chrome Android.
  6. Derived by browser-compat-data mirroring from Chrome Android.

Source data: /compatibility/wake-lock.json · Global usage: 91 % (StatCounter 2026-05)

Source: spec · MDN · Last verified 2026-10-03 · Confidence: low (computed from sources)

Request a 'screen' wake lock and keep a reference to the returned WakeLockSentinel so it can be released later:

let wakeLock = null;
async function requestWakeLock() {
wakeLock = await navigator.wakeLock.request('screen');
wakeLock.addEventListener('release', () => {
wakeLock = null;
});
}

Release it explicitly once the screen no longer needs to stay on:

async function releaseWakeLock() {
if (wakeLock) {
await wakeLock.release();
wakeLock = null;
}
}

Check for wakeLock on navigator before calling request(). When it is absent, fall back to whatever the app already does without a wake lock (for example, leaving the screen’s default timeout in place):

async function keepScreenAwake() {
if (!('wakeLock' in navigator)) {
console.warn('Screen Wake Lock not supported; screen may still dim.');
return null;
}
try {
return await navigator.wakeLock.request('screen');
} catch (err) {
console.warn(`Wake lock request failed: ${err.message}`);
return null;
}
}
  • When the document’s visibility state becomes hidden, the browser releases the lock and fires a release event on the WakeLockSentinel; listen for visibilitychange and re-request the lock when the document becomes visible again.
  • The cited MDN compatibility data records support in Firefox from version 126, Chrome from version 84, and Safari from version 16.4, so run the feature check below rather than assuming availability from a browser name alone.
  • The cited MDN compatibility data records Safari on iOS 16.4 to before 18.4 as a partial implementation because it does not work in standalone Home Screen web apps; it records support from Safari on iOS 18.4.
  • request() rejects when the document is not fully active or its visibility state is hidden, so only call it once the page is confirmed visible.

← Back to the Compatibility explorer.