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

我试图找出一个特定的链接缩短程序和 out.php 链接脚本重定向使用301重定向与否。我正在查看 Chrome 开发工具中的资源标签,但它只显示目标页面的标题,而不是链接脚本本身。

另外,我正在调查的一些站点实际上重定向不止一次,所以最好能够跟踪整个重定向路径。

我怎么才能知道我是怎么被重定向的,他们是否使用了301?

110793 次浏览

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

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.

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