WakeLock

Baseline 2025
Newly available

Since March 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The WakeLock interface of the Screen Wake Lock API can be used to request a lock that prevents device screens from dimming or locking when an application needs to keep running.

This interface, and hence the system wake lock, is exposed through the Navigator.wakeLock property.

Instance methods

request()

Returns a Promise that fulfills with a WakeLockSentinel object if the screen wake lock is granted.

Examples

The following code awaits the request for a WakeLockSentinel object, and continues if the request is granted.

The WakeLock.request() method is wrapped in a try...catch statement to catch cases when the promise might be rejected, such as due to low device power.

js
try {
  const wakeLock = await navigator.wakeLock.request("screen");
} catch (err) {
  // the wake lock request fails - usually system related, such being low on battery
  console.log(`${err.name}, ${err.message}`);
}

Note that the screen wake lock may be revoked by the device after it has been granted. The returned WakeLockSentinel can be used to check the status of the lock, and/or to manually cancel a held screen wake lock.

Specifications

Specification
Screen Wake Lock API
# the-wakelock-interface

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
WakeLock
Chrome – Full support
Chrome 84 (Release date: 2020-07-27)
footnote Full support
Edge – Full support
Edge 84 (Release date: 2020-07-16)
footnote Full support
Firefox – Full support
Firefox 126 (Release date: 2024-05-14)
footnote Full support
Opera – Full support
Opera 70 (Release date: 2020-07-27)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 126 (Release date: 2024-05-14)
footnote Full support
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 16.4 – 18.3 (Release date: 2023-03-27)
footnote Partial support
footnote Does not work in standalone Home Screen Web Apps. See bug 254545.
Safari on iOS – Full support
Safari on iOS 18.4 (Release date: 2025-03-31)
footnote Full support
Samsung Internet – Full support
Samsung Internet 14 (Release date: 2021-04-17)
footnote Full support
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 16.4 – 18.3 (Release date: 2023-03-27)
footnote Partial support
footnote Does not work in standalone Home Screen Web Apps. See bug 254545.
WebView on iOS – Full support
WebView on iOS 18.4 (Release date: 2025-03-31)
footnote Full support
request
Chrome – Full support
Chrome 84 (Release date: 2020-07-27)
footnote Full support
Edge – Full support
Edge 84 (Release date: 2020-07-16)
footnote Full support
Firefox – Full support
Firefox 126 (Release date: 2024-05-14)
footnote Full support
Opera – Full support
Opera 70 (Release date: 2020-07-27)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 126 (Release date: 2024-05-14)
footnote Full support
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 16.4 – 18.3 (Release date: 2023-03-27)
footnote Partial support
footnote Does not work in standalone Home Screen Web Apps. See bug 254545.
Safari on iOS – Full support
Safari on iOS 18.4 (Release date: 2025-03-31)
footnote Full support
Samsung Internet – Full support
Samsung Internet 14 (Release date: 2021-04-17)
footnote Full support
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 16.4 – 18.3 (Release date: 2023-03-27)
footnote Partial support
footnote Does not work in standalone Home Screen Web Apps. See bug 254545.
WebView on iOS – Full support
WebView on iOS 18.4 (Release date: 2025-03-31)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Has more compatibility info.

See also