Reputation: 610
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
Upvotes: 4
Views: 3116
Reputation: 423
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.
Upvotes: 2