In Firebug, how can I stop a redirect? I want to examine and edit a webpage before it redirects. Under the Net tab, using Persist I can see all the GET including the previous pages and the redirect page, but I am still taken to the final redirect page. I want to stop one move before this. Is it possible?

EDIT: It is a JavaScript based redirect, but I need the rest of the JavaScript working, so blocking all JavaScript from execution is not a solution in this instance.

link|improve this question

75% accept rate
feedback

1 Answer

What kind of redirect? There are Firefox addons outside of Firebug you can use to stop redirects. Firebug does not seem to provide this functionality itself.

Redirects based on the HTML "Meta refresh" (also HTTP "Refresh") can be blocked by setting accessibility.blockautorefresh to true in about:config. In fact, this corresponds to the "Warn me when web sites try to redirect or reload the page" option in Options > Advanced > General. Alternatively, addons such as RefreshBlocker can be used.

For JavaScript based redirects, JS can be completely disabled or addons such as NoScript can be used.

There generally isn't much you can inspect on a page that is redirected using HTTP 3xx response codes. In case anyone wants to know, setting network.http.redirection-limit to 0 in about:config causes all of these to show a Firefox error page.

link|improve this answer
It was a JavaScript based redirect, but I needed the rest of the JavaScript working. I'll add this to my question. – Matthew Doucette Feb 10 at 14:46
@Matthew Doucette Unfortunately, that may not be possible in Firefox: superuser.com/questions/353339/… Mozillazine forums and my own testing say CAPS (selectively disabling JS function) won't work with window.location. Perhaps there is another method. – Bob Feb 10 at 15:46
feedback

Your Answer

 
or
required, but never shown

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