Can I prevent phone from sleep on a webpage

You can use:

Prevent display sleep and enable wake lock in any Android or iOS web browser.

Note that the library has some reliability/performance issues on some platforms/browsers. Users have found solutions that are listed in the issue comments and pull requests, but they have not been added since the repo owner appears not to be active currently.

It’s recommended that you check those pull requests (and/or issues) for potential improvements before using in production.

Leave a Comment