I would like to have my web-app reload html every 5 minutes. One way I can do that is by using adding HTML header:
<meta http-equiv="refresh" content="300" />
But this has an issue that even if the page in question is not active, it will go on reloading all the time. By active, I mean the browser window is on foreground and the page is the currently active tab.
How to accomplish this using Javascript? Any help appreciated.