Testing

Wake Lock API: Browser Support, Features, Use Cases

The Wake Lock API works in Chrome 84+, Edge 84+, Opera 70+, Samsung Internet 14+, Firefox 126+, and Safari 16.4+. Learn the API, use cases, and known issues.

Author

Prince Dewani

May 1, 2026

The Wake Lock API is a W3C JavaScript API that lets web pages keep the screen on through the navigator.wakeLock entry point. It works in Chrome 84+, Edge 84+, Opera 70+, Samsung Internet 14+, Firefox 126+, and Safari 16.4+ on macOS and iOS, while Internet Explorer does not support it.

This guide covers what the Wake Lock API is, the browsers that support it, the key features, how to use it, real-world use cases, and the known issues.

What is the Wake Lock API?

The Wake Lock API is a W3C JavaScript API that prevents a device from dimming, locking, or turning off the screen while a web page needs it on. The Web Applications Working Group at the W3C edits the Screen Wake Lock spec, and the API is exposed on navigator.wakeLock with a single supported lock type, "screen".

Which browsers does the Wake Lock API support?

Every modern Chromium-based browser, Firefox, and Safari support the Wake Lock API on desktop, Android, iPadOS, and iOS, so global support sits above 94% as of May 2026.

Loading browser compatibility data...

Wake Lock API compatibility in Chrome

Chrome supports the Wake Lock API from Chrome 84 on Windows, macOS, Linux, ChromeOS, and Android 6.0+. Chrome 71 to 83 had the API behind the chrome://flags/#enable-experimental-web-platform-features flag. Chrome 4 to 70 did not support it.

Wake Lock API compatibility in Edge

Microsoft Edge supports the Wake Lock API from Edge 84 on Windows, macOS, Linux, and Android 6.0+. Pre-Chromium EdgeHTML 12 to 44 never added the API.

Wake Lock API compatibility in Firefox

Firefox supports the Wake Lock API from Firefox 126 on Windows, macOS, Linux, and Firefox for Android 126. Firefox 124 and 125 had the API behind the dom.screenwakelock.enabled preference in about:config. Firefox 2 to 123 did not support it.

Wake Lock API compatibility in Safari on macOS

Safari supports the Wake Lock API from Safari 16.4 on macOS Ventura and every later macOS version, including Safari 17 on Sonoma and Safari 18 on Sequoia. WebKit shipped both WakeLock and WakeLockSentinel in Safari 16.4 with no flag. Safari 3.1 to 16.3 did not support it.

Wake Lock API compatibility in Safari on iOS and iPadOS

Safari on iOS and iPadOS supports the Wake Lock API from iOS 16.4 and iPadOS 16.4. Apple forces every iOS browser to use WebKit, so Chrome, Edge, and Firefox on iOS pick up the same support. iOS 3.2 to 16.3 did not support it, so ship a NoSleep.js fallback for older iPhones.

Wake Lock API compatibility in Opera

Opera supports the Wake Lock API from Opera 70 on Windows, macOS, and Linux, tracking Chromium 84. Opera 57 to 69 kept it behind the experimental-web-platform-features flag. Opera Mobile 80+ supports it on Android; Opera Mini does not support it in any version.

Wake Lock API compatibility in Samsung Internet

Samsung Internet supports the Wake Lock API from Samsung Internet 14.0 on Galaxy phones running Android 6.0 Marshmallow or later. It ships the same Chromium pipeline Chrome for Android uses. Samsung Internet 1.0 to 13.0 did not support it.

Wake Lock API compatibility in Android Browser

Chrome for Android 84+, Samsung Internet 14+, Firefox for Android 126+, and Android WebView together provide the Wake Lock API on Android 6.0+. The legacy stock Android Browser, last shipped with Android 4.4 KitKat, never added it. UC Browser does not support it on any Android version.

Wake Lock API compatibility in Internet Explorer

Internet Explorer does not support the Wake Lock API in any version. Microsoft has retired Internet Explorer 11 from support, so move any wake-lock-dependent web app to Chromium-based Edge or Chrome.

Note

Note: Wake Lock API behavior shifts across Safari, Firefox, and older Android browsers. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of the Wake Lock API?

The Wake Lock API is built around a single Promise-returning request method, a sentinel object you hold to keep the lock alive, and an automatic release tied to page visibility. Every call runs in a secure HTTPS context on a visible document.

  • navigator.wakeLock.request("screen"): Returns a Promise that resolves to a WakeLockSentinel when the system grants the screen wake lock. The page must be visible, or the request rejects with NotAllowedError.
  • WakeLockSentinel.release(): Returns a Promise that resolves once the wake lock is released. Pages call it when the user finishes the wake-lock-bound task.
  • "release" event on WakeLockSentinel: Fires when the lock is released, whether the page asked or the browser auto-released on visibility change. Use it to update UI like a "screen-on" toggle.
  • WakeLockSentinel.released and .type properties: Tell the page whether the lock is still active and which lock type it holds. The type value is always "screen" in current browsers.
  • Auto-release on tab hidden: The browser releases the lock when document.visibilityState flips to "hidden". Re-acquire it inside a visibilitychange handler.
  • Permissions-Policy: screen-wake-lock: Cross-origin iframes are blocked by default. The embedder must list screen-wake-lock in its Permissions-Policy header or on the iframe allow attribute.
  • Secure context only: The API throws on HTTP and on file:// pages. Chrome, Firefox, and Safari gate navigator.wakeLock to HTTPS and to http://localhost.
  • Feature detection with "wakeLock" in navigator: A single in check tells the page whether the API is wired up. Ship a NoSleep.js-style video fallback for browsers that return false.

How do you use the Wake Lock API?

The Wake Lock API is a five-step flow: feature-detect, request a screen lock from a visible page, hold the sentinel, listen for release, and re-acquire on tab focus. The whole sequence sits inside one async function.

  • Feature-detect support: Run "wakeLock" in navigator before you call request, so unsupported browsers fall back cleanly to a NoSleep.js video loop.
  • Call navigator.wakeLock.request("screen"): Make the call from a click handler or from a page that is currently visible. Some browsers reject silent background requests with NotAllowedError.
  • Store the WakeLockSentinel reference: Keep the resolved sentinel in a module-scope variable so later code can call sentinel.release() and so the garbage collector does not drop the lock.
  • Listen for the release event: Wire sentinel.addEventListener("release", handler) so the page can update UI like a "screen-on" badge when the browser or the user releases the lock.
  • Re-acquire on visibilitychange: Add a document.addEventListener("visibilitychange", handler) that calls request("screen") again when document.visibilityState flips back to "visible". The browser drops the lock on hidden tabs.
  • Release the lock when done: Call await sentinel.release() when the user finishes the wake-lock-bound task, such as exiting cooking mode or closing a slide deck. Holding it longer wastes battery.

Paste this snippet into the DevTools console of Chrome, Edge, Firefox, or Safari over HTTPS. Click anywhere on the page once and the console logs a confirmation that the screen wake lock is active.

// Paste this into the DevTools console of Chrome, Edge, Firefox, or Safari over HTTPS.
// The page must be visible and you must run it from a user gesture for some browsers.
let screenLock = null;

if ("wakeLock" in navigator) {
  console.log("Wake Lock API is available.");

  document.body.addEventListener("click", async () => {
    try {
      screenLock = await navigator.wakeLock.request("screen");
      console.log("Screen wake lock acquired. Screen will stay on.");

      screenLock.addEventListener("release", () => {
        console.log("Screen wake lock released. Screen can sleep again.");
      });
    } catch (err) {
      console.error("Wake lock request failed:", err.name, err.message);
    }
  }, { once: true });

  document.addEventListener("visibilitychange", async () => {
    if (screenLock !== null && document.visibilityState === "visible") {
      screenLock = await navigator.wakeLock.request("screen");
      console.log("Screen wake lock re-acquired after tab focus.");
    }
  });
} else {
  console.log("Wake Lock API is not supported in this browser.");
}

If the console prints "Wake Lock API is not supported in this browser", you are on an older iOS, an older Firefox, or a legacy Android Browser. Ship a NoSleep.js-style video fallback for those visitors.

...

What are the use cases of the Wake Lock API?

The Wake Lock API is the right fit for any web app that needs the screen on without a constant tap. Production sites already use it for cooking, navigation, presentations, ticketing, and live streams.

  • Recipe and cooking apps: Keep the screen on while users follow steps with floury or wet hands. Sites like Bon Appetit, Delish, and home-grown recipe PWAs hold a wake lock during the active recipe view.
  • Maps and turn-by-turn navigation: Hold the screen on while a cyclist or driver follows a route. Web map apps acquire the lock when navigation starts and release it on arrival.
  • Presentations and slide decks: Slides.com, Reveal.js, and Google Slides Web hold a screen wake lock during a live talk so the laptop never dims mid-sentence.
  • Boarding passes, tickets, and QR codes: Airline web apps and event ticket pages keep the screen lit until the gate or door scanner reads the barcode.
  • Live streams and long-form video: Streaming sites pair the lock with the playing state, so YouTube-style web players match native-app behavior on Android and iOS.
  • Games using motion or voice input: Web games that read deviceorientation or use the SpeechRecognition API need the screen on without a finger touch between gestures.
  • Reading apps and ebook readers: Web readers hold the lock while a chapter is open, so a long read on a phone does not get cut by the system idle timer.
...

What are the known issues with the Wake Lock API?

The Wake Lock API is well-supported, but the rough edges show up around auto-release on tab hidden, the missing system lock type, and a handful of OS-level power-saver overrides that no web API can defeat.

  • Auto-release on hidden tabs: The browser drops the lock the moment document.visibilityState flips to "hidden". Pages must re-acquire it inside a visibilitychange handler, or the screen sleeps when the user tabs away and back.
  • No system wake lock: Only the "screen" type is supported. The earlier draft defined a "system" lock that kept the CPU alive, but no browser shipped it. Move long-running CPU work to a Service Worker or backend job.
  • HTTPS and visible-document gates: The API throws NotAllowedError on http://, on file://, and on hidden tabs. Background iframes also need a Permissions-Policy: screen-wake-lock opt-in.
  • OS power-saver wins: A device in Low Power Mode on iOS, Battery Saver on Android, or Power Saver on Windows still dims and locks the screen even when a wake lock is active. The lock is a request, not a guarantee.
  • Older Firefox needs a flag: Firefox 124 and 125 keep the API behind dom.screenwakelock.enabled in about:config, so feature-detect and fall back.
  • Older iOS has no fallback: iOS 16.3 and earlier never shipped the API, and Apple's WebKit-only rule means Chrome and Edge on those iPhones inherit the gap. NoSleep.js is the only workaround.
  • The released property is not reactive: WakeLockSentinel.released only flips after the release event fires, so polling it in a loop is wrong. Wire the "release" event listener to update UI instead.

In my experience, the trap that bites every Wake Lock integration once is the auto-release on tab hidden. A user opens a recipe, switches to messages, and switches back, and the screen sleeps because the lock died with the visibility flip. Wire visibilitychange to re-request the lock and the surprise goes away.

Citations

All Wake Lock API version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests