← OS Integration
Screen Wake Lock
Probing…Screen Wake Lock is a web platform capability in the OS Integration category. Keep the screen awake while the page is visible. Supported in Chromium 84+, Firefox 126+, and Safari 16.4+. Requires a secure context (HTTPS or localhost) and a user gesture such as a click or tap.
Secure contextUser gesture
Permission screen-wake-lock: unknown
Try it
Loading demo…
Code
const sentinel = await navigator.wakeLock.request('screen')
sentinel.addEventListener('release', () => console.log('released'))
// Re-acquire when the tab becomes visible again
document.addEventListener('visibilitychange', async () => {
if (document.visibilityState === 'visible') {
await navigator.wakeLock.request('screen')
}
})
await sentinel.release()Browser support
Chromium
84
Firefox
126
Safari
16.4
Frequently asked questions
Which browsers support Screen Wake Lock?
Supported in Chromium 84+, Firefox 126+, and Safari 16.4+.
Does Screen Wake Lock require HTTPS?
Yes. Screen Wake Lock needs a secure context, so it only works over HTTPS (or on localhost during development).
What is Screen Wake Lock used for?
Keep the screen awake while the page is visible.
Can I try Screen Wake Lock in my browser?
Yes. shwcs.net runs a live Screen Wake Lock demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.