Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I stop web pages from being aware of gaining/losing focus (and stop it from refreshing the page)

  • No replies
  • 0 have this problem
  • 40 views

Hi,

I noticed this on facebook in particular but I want to prevent this behaviour on ALL websites.

I noticed that when I focus away from and back from a facebook tab, sometimes it will blank and reload the page.

I DETEST this behaviour, sometimes the content changes, sometimes it fails and hangs !

Even if it worked properly I NEVER want a webpage to be allowed to do that.

How can I make a page unable to tell when I give it attention.

Here are a couple solutions I would like to see

A toggle button PER TAB, where I can PAUSE script execution entirely. I want the page to load and then all scripting to freeze until I press the unpause button (except for whitelisted pages). For this I found the addon "Scriptsafe" but it doesn't have a per-tab setting.

Another solution is, no awareness allowed to the page about losing or gaining focus. This is also abused by youtube to detect screen shutdown, so I never want pages to know they have lost or regained focus. I want to make them believe they are ALWAYS focused.

How can I do either of these things ?

Hi, I noticed this on facebook in particular but I want to prevent this behaviour on ALL websites. I noticed that when I focus away from and back from a facebook tab, sometimes it will blank and reload the page. I DETEST this behaviour, sometimes the content changes, sometimes it fails and hangs ! Even if it worked properly I NEVER want a webpage to be allowed to do that. How can I make a page unable to tell when I give it attention. Here are a couple solutions I would like to see A toggle button PER TAB, where I can PAUSE script execution entirely. I want the page to load and then all scripting to freeze until I press the unpause button (except for whitelisted pages). For this I found the addon "Scriptsafe" but it doesn't have a per-tab setting. Another solution is, no awareness allowed to the page about losing or gaining focus. This is also abused by youtube to detect screen shutdown, so I never want pages to know they have lost or regained focus. I want to make them believe they are ALWAYS focused. How can I do either of these things ?

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.