41

Firefox used to prevent automatic redirects and have a button you could use to opt-in to a redirect. However, a update a couple of months ago eliminated this feature and now Firefox (version 35) always redirects automatic.

How can I get the old behavior back and block automatic redirects?

  • Type the following instead of a URL about:preferences#advanced > check Warn me when websites try to redirect or reload the page. – ROMANIA_engineer Jan 1 '17 at 23:26
  • since firefox 57 there is a "persist logs" option in developer tools, see stackoverflow.com/a/46842778/1069083 – rubo77 Mar 11 '20 at 19:40
32

As of Firefox 56, the menu has now been "simplified" and the option is no longer available.

To turn on the redirect warning:

  1. Type about:config in the address bar
  2. Search for accessibility.blockautorefresh
  3. Set the value to True

Source: Mozilla Support Forum

  • 11
    Doesn't work any more. – Philippe Sep 6 '18 at 22:31
  • It did in my case. You're probably dealing with something different. Still works in FF 62. – Andrew Sep 13 '18 at 22:10
  • 2
    I'm still getting issues with something like duckduckgo.com/?q=!g%20test – rovyko Sep 14 '18 at 19:57
  • @dexgecko It works for me, using your test. Did you keep having issues back after you posted? – Coldblackice Jul 10 '19 at 22:48
  • 1
    As the option name implies, this probably disables the refresh meta tag, but other redirects using the Location header aren't expected to be affected. – Sam Sirry Jun 2 '20 at 3:25
12

Go to about:config and set network.http.redirection-limit to 1. At each redirection you will get a message "the page isn't redirecting properly". The address bar will show the next URL in the sequence of redirections. Press the Try Again button to accept each redirection.

  • 1
    Just in case: the default value is 20. – R S Jun 1 '20 at 22:41
  • 2
    Perhaps this behavior has changed in more recent versions; I found i need to set the value to 0 to stop the redirection. – Sam Sirry Jun 2 '20 at 3:32
8

On the top right, you have the 3 horizontal line menu icon as indicated in the picture below.

Menu icon in new Firefox

Click on options the advanced the> under accessibility > tick the box that says "Warn me when websites try to redirect or load another page".

Advanced options menu Firefox

Although this will restore the old behaviour... EVERY time you click on a link to another website, it will warn you. For example, when you Google something and click on a link, it goes through a couple of redirects before it takes you to the end page ... and you have to click accept each time, which will be a bit of a hassle. It may be that you are trying to block pop-ups. I recommend you read Pop-up blocking and explanation for Firefox (Official Mozilla Guidelines) in case that's what you are trying to do.

3

Under the Tools menu in firefox 35.0.1 /Options/Advanced/General/ tab there's a block you can check to be warned when a site tries a redirect. A panel will rise the question at the top of the screen for the warning and then you can accept or ignore the redirect process. May be this will help you out.

If you still face this problem! Download and install this plugin that prevents automatic redirects

ADBlock

Disable 302 redirects!

Link 1

Link 2

0

There are redirects that appear to take you one place and take you somewhere else, which is like a form of malware. There are also redirects that eventually get you to where you expect to go, but get there via intermediate links that may be designed to track or to generate referral revenue. The second type may or may not be something people object to as a matter of principle, but these are often blocked by the browser, making them at least an annoyance.

You can handle redirects with warnings and opting-in. That is a good strategy if you rarely use web services that normally redirect as part of their operating model. However, if you frequent sites and services that redirect, the warning and opt-in requirement can become a pain in the butt.

In that case, you can deal with it by using an add-on that identifies the ultimate destination and takes you directly there. Firefox Quantum came out since this question was posted, so many of the legacy add-ons for this no longer work. I've tested several replacements for the legacy add-ons, and one I've found that seems to work well (actually better than the legacy add-ons I used), is Skip Redirect by Sebastian Blask.

It is configurable, including blacklisting and whitelisting using patterns:

enter image description here

Dangerous sites tend to be blocked by the browser, anyway, but if you do get redirected to a site that isn't as represented, you can add it to the blacklist.

The best strategy for dealing with redirects (warn/opt-in vs. bypass), will depend on whether the majority that you encounter are an unfortunate characteristic of sites and services you use.

Not the answer you're looking for? Browse other questions tagged or ask your own question.