本文翻译自:“CAUTION: provisional headers are shown” in Chrome debugger

I noticed a strange caution message when looking at downloaded resources using Google chrome inspector (F12): 使用Google Chrome浏览器(F12)查看下载的资源时,我注意到一条奇怪的警告消息:

Caution provisional headers are shown 显示警告临时标题

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. 可以找到相关问题, Chrome阻止请求以及XMLHttpRequest无法加载。 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. 我想知道此消息的含义以及为什么收到它。


#1楼

参考:https://stackoom.com/question/1QrCl/Chrome调试器中的-警告-显示了临时标题


#2楼

The resource could be being blocked by an extension (AdBlock in my case). 该资源可能被扩展程序(在我的情况下为AdBlock)阻止。

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. 如您所引用的问题中所述,当服务器响应时,真实头会更新,但如果请求被阻止,则不会响应。


The way I found about the extension that was blocking my resource was through the net-internals tool in Chrome: 我发现阻止扩展程序的扩展的方法是通过Chrome中的net-internals工具:

For Latest Versions of chrome 对于最新版本的chrome

  • Type chrome://net-export/ in the address bar and hit enter. 在地址栏中输入chrome://net-export/ ,然后按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 您可以在此处查看记录的日志文件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). 单击事件(###),然后使用文本字段查找与您的资源相关的事件(使用URL的一部分)。
  • Finally, click on the event and see if the info shown tells you something. 最后,单击事件,查看显示的信息是否告诉您一些信息。

For Older Versions of chrome 对于较旧版本的chrome

  • Type chrome://net-internals in the address bar and hit enter. 在地址栏中输入chrome://net-internals ,然后按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). 返回到net-internals,单击事件(###),然后使用文本字段查找与您的资源相关的事件(使用URL的一部分)。
  • Finally, click on the event and see if the info shown tells you something. 最后,单击事件,查看显示的信息是否告诉您一些信息。

#3楼

I believe it happens when the actual request is not sent. 我相信当没有发送实际请求时会发生这种情况。 Usually happens when you are loading a cached resource. 通常在加载缓存的资源时发生。


#4楼

I encountered this issue, and I managed to identify a specific cause, which isn't mentioned above either in answers or the question. 我遇到了这个问题,并且设法找到了一个特定的原因,上面在答案或问题中都没有提到。

I am running a full js stack, angular front end and node back end on SSL, and the API is on a different domain running on port 8081, so I am doing CORS requests and withCredentials as I am dropping a session cookie from the API 我正在SSL上运行完整的js堆栈,前端和节点后端的角度,并且API在端口8081上运行的其他域上,所以我正在执行CORS请求和withCredentials,因为我正在从API中删除会话cookie

So specifically my scenario was: POST request, withCredentials to port 8081 caused the "CAUTION: provisional headers are shown" message in the inspector and also of course blocked the request all together. 因此,具体来说,我的情况是:POST请求,带有到端口8081的凭据导致检查器中出现“警告:显示了临时标头”消息,当然也一起阻止了该请求。

My solution was to set up apache to proxy pass the request from the usual SSL port of 443 to the node SSL port of 8081 (node has to be on a higher port as it cannot be ran as root in prod). 我的解决方案是设置apache,以将请求从通常的SSL端口443传递到节点SSL端口8081(节点必须在更高的端口上,因为它不能作为prod中的root运行)。 So I guess Chrome doesn't like SSL requests to unconventional SSL ports, but perhaps their error message could be more specific. 因此,我认为Chrome浏览器不喜欢对非常规SSL端口的SSL请求,但也许他们的错误消息可能更具体。


#5楼

This caution message also occurs if the response is invalid and therefore dropped by the browser. 如果响应无效并因此被浏览器删除,也会出现此警告消息。

In my case the request was correctly sent to the server, the server-side code then produced an error and my custom error handling returned the error message in the HTTP status message field. 在我的情况下,请求已正确发送到服务器,然后服务器端代码产生了错误,而我的自定义错误处理在HTTP状态消息字段中返回了错误消息。 But this error was not received on the client side, due to invalid characters in the error message (described here http://aspnetwebstack.codeplex.com/workitem/1386 ) which resulted in corrupt response headers. 但是由于错误消息中的无效字符(此处描述为http://aspnetwebstack.codeplex.com/workitem/1386 ),导致客户端未收到此错误,导致响应头损坏。


#6楼

I came across this and it went away when I switched from https to http. 我遇到了这个问题,当我从https切换到http时,它消失了。 The SSL certs we use in dev aren't verified by a 3rd party. 我们在开发人员中使用的SSL证书未经第三方的验证。 They're just locally generated dev certs. 它们只是本地生成的开发证书。

The same calls work just fine in Chrome Canary and Firefox. 在Chrome Canary和Firefox中,相同的调用也可以正常工作。 These browsers don't appear to be as strict about the SSL cert as Chrome is. 这些浏览器似乎对SSL证书的要求不如Chrome严格。 The calls would fail in Chrome with the "CAUTION: Provisional headers..." message. 在Chrome中,调用将失败,并显示“警告:临时标头...”消息。

I think/hope that when we use a legit SSL cert in stage and prod, we won't see this behavior in Chrome anymore. 我认为/希望我们在舞台和产品中使用合法的SSL证书时,不会再在Chrome中看到此行为。

Chrome调试器中的“警告:显示了临时标题”相关推荐

  1. 解决微信开发者工具最新版本的调试器中不显示AppData和Storage选项问题

    解决微信开发者工具最新版本的调试器中不显示AppData和Storage选项问题 ** C:\Users\ASUS\AppData\Local\微信开发者工具\User Data\一串什么东西\Wea ...

  2. 微信开发者工具最新版本的调试器中不显示AppData和Storage选项问题

    当我们下载最新版本的微信开发者工具时,会发现调试器中不显示AppData和Storage选项,我们可以打开电脑C盘找到 C:\Users\你的用户名\AppData\Local\微信开发者工具\Use ...

  3. 【C++】在 Visual Studio 调试器中指定符号 (.pdb) 和源文件(转载自RSS翻译)

     在 Visual Studio 调试器中指定符号 (.pdb) 和源文件 查找并指定符号文件和源文件:指定符号加载行为.使用符号和源服务器:自动或按需加载符号.  内容 查找符号 (.pdb) ...

  4. Visual Studio 调试器中的转储文件

    Visual Studio 调试器中的转储文件 转储文件是一个快照,其显示某个时间点正在为应用执行的进程和已为应用加载的模块. 带堆信息的转储还包括该时间点的应用内存的快照. 在 Visual Stu ...

  5. OpenCV图像监视:在Visual Studio调试器中查看内存中图像

    OpenCV图像监视:在Visual Studio调试器中查看内存中图像 图像监视:在Visual Studio调试器中查看内存中图像 先决条件 安装 例子 更多的 图像监视:在Visual Stud ...

  6. 如何在Chrome调试器里检查嵌套Observable对象

    一个例子: 举个例子,看如下这个嵌套的Observable对象: items$: Observable<Observable<Product>[]> = this.compon ...

  7. 设备管理器其它设备Android叹号,设备管理器中的设备显示感叹号/问号/叉号的解决方法...

    设备管理器是Windows操作系统自带的管理工具,其为用户提供了设置设备.启用/禁用设备.更新设备驱动程序等多种强大的功能,帮助用户能后更好的使用电脑的硬件设备,而部分用户在打开设备管理器时,发现部分 ...

  8. YDOOK:Python3.9: breakpoint(*args, **kws) 函数:在调用时进入调试器中 详细用法

    YDOOK:Python3.9: breakpoint(*args, **kws) 函数:在调用时进入调试器中 详细用法 © YDOOK JY Lin 1. 原理: 该函数会调用 sys.breakp ...

  9. Android使用Chrome调试webview中的H5界面

    前言:我们的项目是使用的webview加载H5的应用类型,最近框架升级后项目出现问题.通过chrome进行调试,发现每次都忘记使用步骤.今天记录一下! 下面是调试步骤: 1.电脑下载的Chrom浏览器 ...

  10. Winfrom中设置ZedGraph显示多个标题(一个标题换行显示)效果

    场景 Winforn中设置ZedGraph曲线图的属性.坐标轴属性.刻度属性: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10 ...

最新文章

  1. 连接端口 配置hive_Hadoop大数据平台数据仓库Hive管理操作
  2. Linux运行hadoop命令,将hadoop程序打成jar包,在linux下以命令行方式运行(例如单词计算程序)...
  3. 轻松获取LAMP环境的配置参数
  4. 大数据分析实战-信用卡欺诈检测(五)-逻辑回归模型
  5. SAP License:一个关于交叉表的问题
  6. Educoder Basemap和Seaborn 第一关:Seaborn
  7. 使用ssh连接虚拟机保姆级教程
  8. launchpad乐器_PreSonus 发布 ATOM 打击垫控制器(视频)
  9. 【沙龙干货分享】你要知道的N个Android适配问题
  10. python-decouple简介
  11. python爬虫 点击下一页,总结python爬虫抓站的实用技巧 python爬虫怎么获取下一页的url...
  12. Day28——回溯法力扣打卡
  13. ps4模拟器linux,PS4模拟器PC版下载-Spine(PS4模拟器)v1.0 官方试用版-手机腾牛网
  14. 即时通讯环信IM的集成使用
  15. 基于同态加密体制的安全多方计算
  16. 【146期】面试官问:说一说 RabbitMQ 的几种工作模式和优化建议?
  17. 作为面试官,如何考察工程师的软素质
  18. 009. 我在尼泊尔看雪山
  19. 17. GeoTrellis数据读取篇之读取本地文件系统COG格式数据
  20. 接口 Supplier

热门文章

  1. java生成条形码~~使用barcode4j在线生成条形码
  2. C#生成Code39条形码而非条形码字体的方法
  3. Oracle--CDB和PDB数据库的启动与关闭说明
  4. rational rose导出sql脚本
  5. WinPE 安装系统
  6. 微信小程序获取用户手机号
  7. 汤小丹计算机操作系统慕课版课后题答案第三章:处理机调度与死锁
  8. SSM和SSH框架总结
  9. PowerDesigner下载、安装配置
  10. 导出包含富文本内容和图片的word和pdf