What the Wake Lock API does
The Wake Lock API lets a web page request that a device keep the screen awake. NoSleepScreen uses the screen wake lock type, which is designed for cases where the display should remain visible during an active task. The browser still controls the final decision, which helps protect power, privacy, and device stability.
When you press Start on NoSleepScreen, the script calls the browser API. If the request succeeds, the tool updates the status, starts the elapsed timer, and shows a running state. If it fails, the page shows a clear blocked or unsupported message.
Why wake locks can be released
A wake lock is not a permanent system override. Browsers may release it when a tab is hidden, when a device enters battery saver mode, when the screen is locked, or when a managed policy blocks the feature. This is why the NoSleepScreen interface explains that the page should stay open and visible.
The tool also listens for visibility changes and can try to restore the lock when you return to the tab. That makes it more useful for real-world browsing without pretending to control every operating system rule.
Why this is better than old tricks
Older no sleep pages sometimes relied on hidden media, repeated activity, or other indirect methods. A direct browser wake lock is cleaner because it uses an intended platform feature. It is easier to explain, easier to stop, and better aligned with modern browser behavior.
For users, the result is simple: a lightweight wake lock tool that helps prevent screen sleep without extensions or downloads.