17

I need to temporarily disable 302 redirects in Firefox. How can I do this? I tried going to tools > options > advanced > general > check warn me when sites try to redirect or reload the page, but that didn't work, 302 redirects are still followed. Is there anywhere in about:config that I can disable 302 redirects?

1

3 Answers 3

19

call about:config and set network.http.redirection-limit to 0. But you won't be able to access the moved page.

6
  • As I don't have Firefox installed right now, and for others benefit - What does changing this setting as advised do? Would hope that the user would get some warning (rather than a blank page) and / or a offer to load the next redirect.
    – user66001
    Jan 19, 2013 at 21:21
  • @user66001 This setting is absolutely useless for end user. It is a limit of redirects before Firefox decides that it got into a redirect loop and stops following redirects. If you set it to 0 you'll get "Firefox decided that it got a redirect which will not end" error message immediately.
    – hijarian
    Jun 30, 2015 at 17:43
  • 1
    To anyone reading this answer: strictly speaking, this is the solution as OP asked: 302 redirects will stop being followed. But if you actually want manual redirection, then it's not the solution you want.
    – hijarian
    Jun 30, 2015 at 17:44
  • 2
    Thanks, this is exactly what I (and the OP) was looking for. To anyone not understanding how this setting can help: ask yourself how use the "allow cookies/images/stuff for this website" Firefox actions when you cannot access any page of that domain (always being redirected to another domain).
    – CDuv
    Mar 12, 2016 at 20:47
  • the user gets the "problem redrecting" error page. allowing the user to examine the headers and SSL certificate for the origin page etc. setting '1' here instead of 0 allows single-stepping though the redirect chain (by clicking retry)
    – user313114
    Jun 23, 2017 at 1:17
1

Not specific to Firefox, but you could use the Fiddler debugging proxy, and set a breakpoint on the response. Or use a script like (I guess):

oSession.oResponse.headers.Remove("Location");
2
  • does this also block HTML <meta http-equiv='location redirects and javascript redirects?
    – user313114
    Jun 23, 2017 at 1:21
  • No, but I guess one could write another rule to delete those from the HTML, using oSession.utilDecodeResponse(); oSession.utilReplaceInResponse(...);. I don't have Fiddler around to try.
    – Arjan
    Jun 23, 2017 at 7:53
0

In "Developer Tools > Debugger" in "XHR Breakpoints" there is the possibility to "Pause on any URL".

It's also possible to define other rules where redirections should be paused.

Then there are some buttons to step forward etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .