为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Option to 'Warn me when websites...try to reload' doesn't work?

  • 4 个回答
  • 2 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

Firefox 37.0.1 (and all of my previous installations) for MacOS X 10.7.5.

I would have thought such a simple case of javascript reload was covered. For example, drudgereport.com still annoyingly reloads every few minutes due to this in its header:

var timer = setInterval("autoRefresh()", 1000 * 50 * 3); function autoRefresh(){self.location.reload(true);}

Would this not qualify as a bonefide browser bug?

Firefox 37.0.1 (and all of my previous installations) for MacOS X 10.7.5. I would have thought such a simple case of javascript reload was covered. For example, drudgereport.com still annoyingly reloads every few minutes due to this in its header: var timer = setInterval("autoRefresh()", 1000 * 50 * 3); function autoRefresh(){self.location.reload(true);} Would this not qualify as a bonefide browser bug?

被采纳的解决方案

The setting in "Options/Preferences > Advanced > General" doesn't work when JavaScript is used to refresh a web page like the drudgereport website is using.

A possible workaround is to use a bookmarklet to disable this 'feature'. You need to use the bookmarklet each you (re)load the web page.

javascript:clearInterval(timer);void(autoRefresh=null);

The setting in "Options/Preferences > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.

See also:

定位到答案原位置 👍 1

所有回复 (4)

more options

kencute is clearly a spammer. Anyone else?

more options

选择的解决方案

The setting in "Options/Preferences > Advanced > General" doesn't work when JavaScript is used to refresh a web page like the drudgereport website is using.

A possible workaround is to use a bookmarklet to disable this 'feature'. You need to use the bookmarklet each you (re)load the web page.

javascript:clearInterval(timer);void(autoRefresh=null);

The setting in "Options/Preferences > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.

See also:

由cor-el于修改

more options

Nicely elegant solution.

This works a charm, though it'd be better as a single step (load page and stop reload as one bookmark). I've tried variants of:

javascript:location='http://drudgereport.com';clearInterval(timer);void(autoRefresh=null);

...to no avail. Is this possible?

more options

No, that won't work because the JavaScript needs to run when the page has finished loading and that won't happen if you change the location. You would have to use GreaseMonkey or Scriptish to achieve that and run the script on page load.