为什么页面加载的某些请求需要这么长时间?
我正在使用带有 Firebug 插件的 Firefox。 如下图所示,有些请求等待时间超过一秒,而其余请求则在页面开始加载时在几毫秒内完成。总页面加载时间比我预期的要长得多。
- 为什么有些请求花费的时间超过一秒?
- 我该如何解决这个问题?
第一个请求是页面本身,这就是我预期的加载时间。
编辑:
我可能应该提到,这是一个本地站点计算机上安装了瘦 Apache 客户端。当我在实时(但本地,IIS)站点上加载相同页面时,我得到这些读数,并且它们完全正常。
嗯,总尺寸比另一台要小得多。也许另一台没有缓存? 也许与此有关? :P
有人愿意解释一下吗?
I'm using Firefox with the Firebug add-on.
As the picture below shows, there are some requests that are waiting for more than one second while the rest are completed within milliseconds as the page begins to load. The total page load time is much higher than I expected it to be.
- Why are some of the requests taking more than one second?
- How can I fix this?
The first request is the page itself, which is what I expected the load time to be.
EDIT:
I should probably have mentioned, this is a local site with a thin Apache client installed on a computer. When I load the same page on the live (yet local, IIS) site, I get these readings, and they are completely normal.
Hmm, the total size is much lower than from the other one. Maybe there's no caching on the other one?
Maybe it has something to do with that? :P
Anyone care to explain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果两次安装之间的代码没有变化,我将开始查看您的 Web 服务器配置以及 Apache 和 IIS 安装之间的差异。
顺便说一句,您还需要考虑减少 CSS 和 JS 文件的数量,以避免与服务器的往返
If the code is unchanged between the two installations, I'd start looking at your webserver configs and the differences between the Apache and IIS installations.
As an aside you also want to look at reducing the number of CSS and JS files to avoid round trips to the server
您的主页只是慢慢生成的。
如果它是动态页面,您可以查看该页面执行的操作并加快它们的速度。
You main page is just slowly generated.
If it is a dynamic page you could have a look at the operations the page does and speed them up.