了解Chrome网络日志“停滞"状态 [英] Understanding Chrome network log "Stalled" state

查看:39
本文介绍了了解Chrome网络日志“停滞"状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 chrome 中有以下网络登录:

I've a following network log in chrome:

我不明白其中的一件事:填充的灰色条和透明的灰色条有什么区别.

I don't understand one thing in it: what's the difference between filled gray bars and transparent gray bars.

推荐答案

Google 在 评估网络性能 部分.

Google gives a breakdown of these fields in the Evaluating network performance section of their DevTools documentation.

请求在发送之前等待的时间.这段时间包括在代理协商中花费的任何时间.此外,这个时间将包括浏览器等待已建立的连接可供重复使用的时间,遵守 Chrome 的 每个源规则最多 6 个 TCP 连接.

Stalled/Blocking

Time the request spent waiting before it could be sent. This time is inclusive of any time spent in proxy negotiation. Additionally, this time will include when the browser is waiting for an already established connection to become available for re-use, obeying Chrome's maximum six TCP connection per origin rule.

(如果您忘记了,Chrome 在悬停工具提示和计时"面板下有一个说明"链接.)

(If you forget, Chrome has an "Explanation" link in the hover tooltip and under the "Timing" panel.)

基本上,您会看到这种情况的主要原因是,Chrome 每次只能为每个服务器下载 6 个文件,并且其他请求将被暂停,直到连接槽可用.

Basically, the primary reason you will see this is because Chrome will only download 6 files per-server at a time and other requests will be stalled until a connection slot becomes available.

这不一定需要修复,但避免停滞状态的一种方法是跨多个域名和/或服务器分发文件,保持 CORS 如果适用于您的需求,但 HTTP2 可能是一个更好的选择.资源捆绑(如 JS 和 CSS 串联)也有助于减少停滞连接的数量.

This isn't necessarily something that needs fixing, but one way to avoid the stalled state would be to distribute the files across multiple domain names and/or servers, keeping CORS in mind if applicable to your needs, however HTTP2 is probably a better option going forward. Resource bundling (like JS and CSS concatenation) can also help to reduce amount of stalled connections.

这篇关于了解Chrome网络日志“停滞"状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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