在 Chrome 中查看完整的重定向路径和 HTTP 状态代码
我试图找出某个链接缩短器和 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
自 2014 年以来,
Chrome 检查器顶部(在
Network
选项卡中)有一个复选框,上面写着Preserve log
。启用此选项。现在页面如何导航并不重要,检查器将保留所有日志历史记录 - 包括重定向响应。旧版 Chrome
Chrome 检查器的底部(在
网络
选项卡中)有一个带有大圆圈的按钮。将鼠标悬停在此按钮上,会出现一个工具提示:在导航时保留日志
。单击该按钮,它会变成红色。现在页面如何导航并不重要,检查器将保留所有日志历史记录 - 包括重定向响应。Since 2014
At the top of Chrome's inspector (in the
Network
tab) is a checkbox which saysPreserve 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 saysPreserve 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.我遇到了同样的问题,发现解决方案与以前的答案略有不同。
我必须在过滤栏中选择“其他”文档类型,并勾选“保留日志”并记录网络登录。
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 的开发者工具中 - 选择“资源” - 然后在“文档”或“其他”下,您应该能够找到原始请求 - 查看“标头”以查看状态代码 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