需要帮助了解 Firebug 的 Net 选项卡统计信息
尽管我的问题与这个问题非常相似,但它是不是重复的。
图像显示 Firebug 的 NET 选项卡的统计数据,每个请求只需要几分之一秒的时间(所有请求加起来为 2.9 秒),但总时间加起来为 6 秒。
如何找出哪个请求花费的时间最长,以及额外的 3 秒从何而来?
Even though my question is very similar to this one, it's not a duplicate.
The images shows the stats from Firebug's NET tab, each request is taking a fraction of a second (all requests add up to 2.9 sec), yet the total time adds up to 6 seconds.
How do I figure out which request took the longest time, and where did the extra 3 seconds came from?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请求不一定是并行的。 大多数浏览器每个主机仅提取 2 个并发资源。因此,如果所有六个资源都位于同一主机上,它们可能只是阻塞。此外,如果这些资源是 JavaScript 或一些其他可能在加载时被解析的资源。
另请注意,总时间是页面加载事件触发时的时间,因此这并不一定意味着白屏持续六秒。
请查看 YSlow 指南,了解有关性能的更多详细信息。我还建议构建更快的网站如果您我对这个话题真的很感兴趣。
Requests are not necessarily in parallel. Most browsers only pull 2 concurrent resources per host. So if all six of your resources are on the same host, they could simply be blocking. Furthermore, if these resources are JavaScript or some other resources that may be parsed on load.
Also note that the total time is when the page load event fires, so this doesn't necessarily mean that is a white screen for six seconds.
Check out the YSlow guidelines for more details tips on performance. I also recommend Building Faster Websites if you're really interested in this subject.