Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent a device from going idle without refreshing HTML

I have a simple website as seen here. It's a cross-platform counter program. It does what I want it to do which it good.

The only thing I want to improve is to prevent the device from going idle or locking when the page is open. I want to do this is a way that does not reset the number.

I've seen some methods but they involve refreshing, which will reset the number on the site. Is there a way to keep the device from sleeping using CSS or JavaScript?

-Thanks

like image 969
Diriector_Doc Avatar asked Sep 17 '25 21:09

Diriector_Doc


1 Answers

It's not recommended, but yes, it is.

Here's another question for android, but that's right for you.

And here a simple Javascript library with what you are looking for.

like image 99
Alexander Paul Avatar answered Sep 20 '25 12:09

Alexander Paul