mercredi 4 septembre 2019

Can I make a html-website function as a background-program?

I have been working on a html-website lately. The website is a web-app made to measure time spent on a project and to map your efficiency per hour of the day.

I have tested this website while looking at the website, and it worked fine. It is that I have just recently added a part where it will map your time over the day, and since I had to wait for 5 minutes while the clock was passing a 5 minute treshhold, I figured that it would be efficient to do some other things while letting the clock do its thing.

Unfortunately I was kind of shocked to see that the clock had not changed even a millisecond, and that has to be because the js-interval was not continued when viewing a different chrome tab. Once I opened the clock it continued where it was left once I switched tabs.

Now my question is: Is there a way to let the HTML-website run in the background, just like a background-application, so you can do other tasks while the website will continue it's interval?

Sorry for the bad grammar BTW.

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire