firefox – Forbid http-equiv="refresh" redirect – Super User – Super User

The best answers to the question “firefox – Forbid http-equiv="refresh" redirect – Super User” in the category Super User.

QUESTION:

When javascript is off (NoScript), a site redirects me and i can’t get back to the page i came to.

<noscript><meta http-equiv="refresh" content="0; URL=/badbrowser.php"></noscript> 

How to forbid such redirect but let me follow it manually (like NoRedirect does), or at least make it leave an entry in page history?

NoRedirect doesn’t handle this situation.

Information for other browsers is welcome too.

ANSWER:

NoScript → Options → Advanced → Untrusted → ‘Forbid META redirections inside <noscript> elements’

ANSWER:

In firefox, go to about:config and search for “refresh”. Then, just set accessibility.blockautorefresh to true and you’re done.

ANSWER:

I came to this question looking for a solution in uBlock Origin. In the filters list, you can put a global disable for this type of noscript meta refresh infinite loop shenanigans:

*##^noscript > meta[http-equiv="refresh"]

This disables all meta refresh directives inside noscript tags on all sites.

ANSWER:

A really quick solution:

open Scratchpad (Shift+F4)
switch Environment to Browser
type gBrowser.webNavigation.allowMetaRedirects = false
Execute/Run

Congratulations, now the current tab (and only that tab) will be immune to meta redirects.