如何在 Firefox 中跟踪重定向?

发布于 2025-01-02 00:51:19 字数 133 浏览 2 评论 0原文

我希望能够跟踪和调试各种重定向(服务器、JavaScript、HTML)。

告诉 Firefox 中断重定向并显示重定向信息的最简单方法是什么,之后我必须能够恢复重定向?

我尝试过 NoRedirect,但似乎无法使其工作。

I'd like an ability to trace and debug all kinds of redirects (server, JavaScript, HTML).

What is the easiest way to tell Firefox to break on redirects and to display redirect information, after which I must have the ability to resume redirect?

I've tried NoRedirect, and I can't seem get it to work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

爱要勇敢去追 2025-01-09 00:51:19

尝试 firebugs net 选项卡中的“坚持”按钮。它将跟踪所有重定向。

Try "persist" button in firebugs net tab. It will keep trace of all redirects.

墨洒年华 2025-01-09 00:51:19

如果您使用的是 Firefox(启用了 Firebug),您可以临时将这些行添加到 HTML 头部的 script 元素中,以跟踪 window.location 调用:

window.watch("location", function(id, oldv, newv) { debugger; return newv; });
document.watch("location", function(id, oldv, newv) { debugger; return newv; });

我认为您也可以扩展这适用于 topself,但这仅在您使用框架时才有用。我知道这并不多,但总比没有好,而且肯定比这里列出的所有其他解决方案要好得多。我仍在寻找一种方法来跟踪其他类型的 JS 重定向,例如 window.navigate。

If you're using Firefox (with Firebug enabled), you can temporarily add these lines in a script element in the head of your HTML in order to trace window.location calls:

window.watch("location", function(id, oldv, newv) { debugger; return newv; });
document.watch("location", function(id, oldv, newv) { debugger; return newv; });

I think you can also extend this for top and self, but this is only useful if you're using frames. I know it's not much, but it's better than nothing and certainly much better than all the other solutions listed here. I'm still looking for a way to trace other types of JS redirects, such as window.navigate.

ぽ尐不点ル 2025-01-09 00:51:19

您可以尝试安装 firebug 插件,并查看一些有关如何使用它的教程。

You can try to install firebug plugin, and have a look on some tutorial on how to use it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文