微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

javascript – PerformanceTiming.responseStart是指向HTML还是标题开始?

我有一个关于 PerformanceTiming.responseStart的问题.

是时候将标题的第一个字节转换为HTML的第一个字节了吗?在某些项目中,这个时间可能非常不同. E. g.使用渐进式页面渲染时.

解决方法

[…] must return the time immediately after the user agent receives the first byte of the response from the server

http://www.w3.org/TR/2012/REC-navigation-timing-20121217/#dom-performancetiming-responsestart

响应是包括HTTP-Header在内的所有内容,甚至在HTML-Head之前.这是第一次在网络套接字上读取数据的时刻.

这是一个关于它的neet小动画和解释页面https://varvy.com/performance/responsestart.html

When a resource is retrieved via the network (rather than the application cache) responseStart represents part of the HTTP request / response timeline.

在浏览器网络工具F12中的这个时间点:

原文地址:https://www.jb51.cc/js/156979.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐