0

I have a PHP script which is more like a cron job. It refreshes the page every few seconds using the meta-refresh tag. But I've noticed that when the tab is inactive, the refresh takes several seconds, sometimes even longer.

But when I switch to that tab, the existing refresh task finishes immediately at high priority and also the same for new refresh tasks.

My question is, how do I force the page to reload at high priority even if it's inactive?

Note:

  • I tried location.reload() as well as location.href=xxx. Same issue while inactive.

  • It's a local website so an unconventional solution like changing chrome advanced settings is completely fine.

  • 1
    In general, inactive tabs get low priority. See https://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-also-work-when-a-tab-is-inactive-in-chrome for a related issue. – Barmar Jul 23 '20 at 02:13
  • @Barmar Is there any workaround for meta-refresh? Btw it's a local website so an unconventional solution like changing chrome advanced settings is completely fine. –  Jul 23 '20 at 02:32
  • If there is, it will probably be mentioned in that thread. I don't know anything myself about it. – Barmar Jul 23 '20 at 03:01

0 Answers0