Firebug net 选项卡报告页面接收时间较长(页面加载缓慢)

发布于 2024-10-19 21:36:51 字数 1087 浏览 3 评论 0原文

我遇到一个问题,页面似乎需要大约 8 秒才能加载,而且没有明显的原因。

正如您在此屏幕截图中看到的,所有页面上的资源在 8 秒之前就加载完毕,并且大部分加载时间是在页面本身的“接收”阶段报告的。

什么可能导致这种情况?

有人建议,由于文件编码错误,可能会错误地报告内容长度标头,但检查标头后,我看不到内容长度集,这可能是原因吗?

示例标头如下:(

Date: Wed, 02 Mar 2011 09:20:42 GMT
Server: Apache
X-Powered-By: PHP/5.2.6
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Wed, 02 Mar 2011 09:20:42 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="NON CURa ADMa DEVa TAIa CONi OUR DELa BUS IND PHY ONL UNI PUR COM NAV DEM STA"
Set-Cookie: xid=025d2e1ac48dcb568d4dd35d79a5b726; path=/; domain=www.xxx.xx.xx; httponly
xid=025d2e1ac48dcb568d4dd35d79a5b726; path=/; domain=www.xxx.xx.xx; httponly
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

在 set-cookie 中故意审查域)

我检查了另一个网站,该网站也没有设置内容长度,并且加载似乎没有任何问题。

I am experiencing a problem where a page appears to be taking around 8s to load for no apparent reason.

As you can see in this screenshot, all the resources on the page load well before 8s and the large majority of the loading time is reported in the "receiving" stage of the page itself.

What could cause this?

A suggestion has been made that the content-length header might be reported incorrectly due to a faulty file encoding, but having inspected the header I can't see a content-length set, could that be the cause?

An example header follows:

Date: Wed, 02 Mar 2011 09:20:42 GMT
Server: Apache
X-Powered-By: PHP/5.2.6
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Wed, 02 Mar 2011 09:20:42 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="NON CURa ADMa DEVa TAIa CONi OUR DELa BUS IND PHY ONL UNI PUR COM NAV DEM STA"
Set-Cookie: xid=025d2e1ac48dcb568d4dd35d79a5b726; path=/; domain=www.xxx.xx.xx; httponly
xid=025d2e1ac48dcb568d4dd35d79a5b726; path=/; domain=www.xxx.xx.xx; httponly
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

(domain deliberately censored in set-cookie)

I have checked another website which also doesn't have a content-length set and that appears to load without any issues.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

何时共饮酒 2024-10-26 21:36:51

我在代理检查请求时看到过这种情况,尤其是通过 HTTPS 时。

I've seen this when requests are inspected by a proxy, especially if over HTTPS.

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