Keep screen on

Published: November 27, 2023

With JavaScript you can request to keep the screen on. This can be handy to prevent the operating system from hibernating.

js
navigator.wakeLock.request('screen')

Note that leaving the tab or window will release the lock.