I
I
Ingvar Von Bjork2020-12-07 17:27:41
JavaScript
Ingvar Von Bjork, 2020-12-07 17:27:41

How to enable JS after wake up?

There is a site with setInterval set, it works fine on the computer, but on the phone, after switching to standby mode, setInterval stops working. With what it can be connected?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Gleb Starkov, 2020-12-07
@colonel

Don't turn it on at all.
May work on Android in FireFox, but not in Chrome.
It won't work anywhere on the iPhone.

F
FODD, 2020-12-07
@FODD

For some reason, there is a suspicion that setInterval is being used to check for new content.
If so , then you can use the Push API , and check if the loaded page exists at the time the push arrives.

R
rPman, 2020-12-07
@rPman

Catch the appresume event

window.appResumeEvent = new Event('appresume');
window.addEventListener('appresume', yourFunction, false);

well and this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question