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?
-
May be this will help you out. Link– Mahavirsinh PadhiyarMay 26, 2015 at 14:20
3 Answers
call about:config
and set network.http.redirection-limit
to 0
. But you won't be able to access the moved page.
-
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. 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.– hijarianJun 30, 2015 at 17:43
-
1To 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.– hijarianJun 30, 2015 at 17:44
-
2Thanks, 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).– CDuvMar 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) Jun 23, 2017 at 1:17
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");
-
does this also block HTML
<meta http-equiv='location
redirects and javascript redirects? 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.– ArjanJun 23, 2017 at 7:53
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.