“注意:显示临时标题"在 Chrome 调试器中 [英] "CAUTION: provisional headers are shown" in Chrome debugger

查看:34
本文介绍了“注意:显示临时标题"在 Chrome 调试器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用谷歌浏览器检查器 (F12) 查看下载的资源时,我注意到一条奇怪的警告信息:

I noticed a strange caution message when looking at downloaded resources using Google chrome inspector (F12):

显示注意临时标题

我发现了一些可能相关的内容,网络面板:请注意临时请求标题,但我无法完全理解它.相关问题可以在 Chrome 阻止请求 以及 XMLHttpRequest 无法加载.卸载的资源显示警告:显示临时标题.

I found something possibly relevant, Network Panel: add caution about provisional request headers, but I could not fully understand it. Related questions can be found Chrome block requests as well as XMLHttpRequest cannot load. Unloaded resources show caution: Provisional headers are shown.

类似于第一个问题,我的资源被屏蔽了,但后来自动加载了相同的资源.与第二个问题不同,我不想要修理任何东西;我想知道这条消息的含义以及我收到它的原因.

Similar to the first question, my resource was blocked, but later automatically loaded the same resource. Unlike the second question, I don't want to fix anything; I want to know what this message means and why I received it.

推荐答案

资源可能被扩展程序阻止(在我的例子中是 AdBlock).

The resource could be being blocked by an extension (AdBlock in my case).

消息在那里是因为从未发出检索该资源的请求,因此显示的标头不是真实的.如您引用的问题中所述,当服务器响应时,真实标头会更新,但如果请求被阻止,则没有响应.

The message is there because the request to retrieve that resource was never made, so the headers being shown are not the real thing. As explained in the issue you referenced, the real headers are updated when the server responds, but there is no response if the request was blocked.

我通过 Chrome 中的 net-internals 工具发现了阻止我的资源的扩展程序:

The way I found about the extension that was blocking my resource was through the net-internals tool in Chrome:

对于最新版本的 chrome

  • 在地址栏中输入 chrome://net-export/ 并按 Enter.
  • 开始录制.并将录音文件保存到本地.
  • 打开显示问题的页面.
  • 回到网络内部
  • 您可以在此处查看记录的日志文件 https://netlog-viewer.appspot.com/#import
  • 点击事件 (###) 并使用文本字段查找与您的资源相关的事件(使用部分 URL).
  • 最后,点击活动,看看显示的信息是否告诉您一些信息.
  • Type chrome://net-export/ in the address bar and hit enter.
  • Start Recording. And save Recording file to local.
  • Open the page that is showing problems.
  • Go back to net-internals
  • You can view Recorded Log file Here https://netlog-viewer.appspot.com/#import
  • click on events (###) and use the textfield to find the event related to your resource (use parts of the URL).
  • Finally, click on the event and see if the info shown tells you something.

对于旧版本的 chrome

  • 在地址栏中输入 chrome://net-internals 并按 Enter.
  • 打开显示问题的页面.
  • 返回 net-internals,点击事件 (###) 并使用文本字段查找与您的资源相关的事件(使用部分 URL).
  • 最后,点击活动,看看显示的信息是否告诉您一些信息.
  • Type chrome://net-internals in the address bar and hit enter.
  • Open the page that is showing problems.
  • Go back to net-internals, click on events (###) and use the textfield to find the event related to your resource (use parts of the URL).
  • Finally, click on the event and see if the info shown tells you something.

这篇关于“注意:显示临时标题"在 Chrome 调试器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆