在 Chrome 中查看完整的重定向路径和 HTTP 状态代码

发布于 2024-10-12 22:20:33 字数 190 浏览 0 评论 0原文

我试图找出某个链接缩短器和 out.php 链接脚本是否使用 301 重定向进行重定向。我正在查看 Chrome 开发人员工具中的资源选项卡,但它仅显示目标页面的标题,而不显示链接脚本本身的标题。

另外,我正在调查的一些网站实际上会多次重定向,因此最好能够跟踪整个重定向路径。

我如何查看我是否被准确重定向,以及他们是否使用 301?

I'm trying to find out of a certain link shorteners and out.php linkscripts redirect using 301 redirect or not. I'm looking at the resources tab in Chrome's developer tools, but it only shows headers for the target page and not for the link scripts itself.

Also, some of the sites I'm investigating actually redirect more than once, so it'd be best if I could track the entire redirect path.

How can I see if how I was exactly redirected, and if they were using 301 or not?

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

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

发布评论

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

评论(3

留一抹残留的笑 2024-10-19 22:20:33

自 2014 年以来,

Chrome 检查器顶部(在Network 选项卡中)有一个复选框,上面写着Preserve log。启用此选项。现在页面如何导航并不重要,检查器将保留所有日志历史记录 - 包括重定向响应。

旧版 Chrome

Chrome 检查器的底部(在网络选项卡中)有一个带有大圆圈的按钮。将鼠标悬停在此按钮上,会出现一个工具提示:在导航时保留日志。单击该按钮,它会变成红色。现在页面如何导航并不重要,检查器将保留所有日志历史记录 - 包括重定向响应。

Since 2014

At the top of Chrome's inspector (in the Network tab) is a checkbox which says Preserve log. Enable this option. Now it doesn't matter at all how the page navigates, the inspector will keep all log history -- including the redirect response.

Older versions of Chrome

At the bottom of Chrome's inspector (in the Network tab) is a button with a big circle. Hover over this button and a tooltip says Preserve log upon navigation. Click the button and it will turn red. Now it doesn't matter at all how the page navigates, the inspector will keep all log history -- including the redirect response.

萌︼了一个春 2024-10-19 22:20:33

我遇到了同样的问题,发现解决方案与以前的答案略有不同。

我必须在过滤栏中选择“其他”文档类型,并勾选“保留日志”并记录网络登录。

Chrome 开发工具截图

I had the same issue and found the solution differed slightly to previous answers.

I had to select Other for the document type in the filter bar, as well as have preserve log ticked and record network log on.

Chrome Dev Tools Screenshot

南街九尾狐 2024-10-19 22:20:33

在 Chrome 的开发者工具中 - 选择“资源” - 然后在“文档”或“其他”下,您应该能够找到原始请求 - 查看“标头”以查看状态代码 301。这里有一篇很棒的文章 - http://www.html5rocks.com/tutorials/developertools/part1/#toc-resources

In Chrome's developer tools - select "Resources" - then under either "Documents" or "Other" you should be able to find the original request- view the "Headers" to see status code of 301. There's a great article here - http://www.html5rocks.com/tutorials/developertools/part1/#toc-resources

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