为什么页面加载的某些请求需要这么长时间?

发布于 2024-12-22 20:07:10 字数 556 浏览 2 评论 0原文

我正在使用带有 Firebug 插件的 Firefox。 如下图所示,有些请求等待时间超过一秒,而其余请求则在页面开始加载时在几毫秒内完成。总页面加载时间比我预期的要长得多。

  1. 为什么有些请求花费的时间超过一秒?
  2. 我该如何解决这个问题?

第一个请求是页面本身,这就是我预期的加载时间。 时间线显示一些等待时间超过一秒的请求 颜色表示,将鼠标悬停在第一个请求上并加载超过一秒


编辑:

我可能应该提到,这是一个本地站点计算机上安装了瘦 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.

  1. Why are some of the requests taking more than one second?
  2. How can I fix this?

The first request is the page itself, which is what I expected the load time to be.
Timeline displays some requests with a waiting period of more than one second
Color representations, hovering over first request with more than one second load


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.

Readings from live site
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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

兮子 2024-12-29 20:07:10

如果两次安装之间的代码没有变化,我将开始查看您的 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

失而复得 2024-12-29 20:07:10

您的主页只是慢慢生成的。
如果它是动态页面,您可以查看该页面执行的操作并加快它们的速度。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文