Firebug net 选项卡报告页面接收时间较长(页面加载缓慢)
我遇到一个问题,页面似乎需要大约 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在代理检查请求时看到过这种情况,尤其是通过 HTTPS 时。
I've seen this when requests are inspected by a proxy, especially if over HTTPS.