Disable 302 Redirects in Firefox

13

6

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?

David Chang

Posted 2010-10-10T18:40:19.253

Reputation: 131

May be this will help you out.

Link

– Mahavirsinh Padhiyar – 2015-05-26T14:20:25.303

Answers

13

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

omnibrain

Posted 2010-10-10T18:40:19.253

Reputation: 454

@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 – 2015-06-30T17:43:00.830

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 – 2015-06-30T17:44:17.417

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). – CDuv – 2016-03-12T20:47:54.717

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 – 2017-06-23T01:17:32.037

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 – 2013-01-19T21:21:43.187

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.

dxvargas

Posted 2010-10-10T18:40:19.253

Reputation: 111

0

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");

Arjan

Posted 2010-10-10T18:40:19.253

Reputation: 29 084

does this also block HTML <meta http-equiv='location redirects and javascript redirects? – user313114 – 2017-06-23T01:21:18.383

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 – 2017-06-23T07:53:03.153