我从 pingdom 工具运行了一个测试来检查我网站的加载时间...结果是我有很多文件,尽管非常小(5kB),但需要很长时间(1 秒或更多) )加载,因为在连接开始和数据下载开始之间存在大延迟(在 pingdom 工具中,这会导致非常大的绿色条)。
例如看看这个: http://tools.pingdom.com/default.asp?url=http%3a%2f%2fwww.giochigratis-online.net%2f&id=5691308
我怎样才能降低“绿吧”时间到了?这是一个 apache 问题(比如,我不知道,最大并行连接数,或类似的问题......),还是硬件问题? CPU 限制、带宽限制还是其他什么?
我看到许多其他网站都有很少的绿条...他们如何减少连接和实际数据发送之间的延迟?
谢谢!
ps.:该网站是用drupal制作的。主页生成大约需要 700ms
pps。:我在同一服务器上测试了 3 个其他网站:同样的问题。
i ran a test from pingdom tools to check the loading time of my website... the result is that i have a lot of files that, in spite of being very small (5kB), take a lot of time (1 second or more) to load because there is a big delay between the beginning of the connection and the beginning of data downloading (in pingdom tools, this results in a very large green bar).
Have a look at this for example: http://tools.pingdom.com/default.asp?url=http%3a%2f%2fwww.giochigratis-online.net%2f&id=5691308
How can i lower the "green bar" time? Is this an apache problem (like, i dont know, the number of max. parallel connections, or something similar...), or an hardware problem? Cpu-limited, bandwith-limited, or what else?
I see that many other websites have very little green bars... how do they reduce the delay between the connection and the real data sending?
Thanks!
ps.: the site is made with drupal. Homepage generation takes about 700ms
pps.: i tested 3 other websites on the same server: same problem.
发布评论
评论(1)
我认为这可能是 max no 的问题。正如您提到的并行连接 - 无论是在服务器端还是客户端。例如,Firefox 的默认值为
network.http.max-connections-per-server
= 15(请参阅此处),而您的域中还有超过 70 个文件需要下载,另外 40 个文件需要从 Facebook 下载。您可以通过生成精灵(即由多个小图像组成的图像)来减少加载图像的数量,然后使用 CSS 在您想要的位置正确显示它们。这被 Google 广泛使用 - 请参阅 http://www.google.com/images/nav_logo83 .png
I think it could be the problem with max no. of parallel connections as you mentioned - either on server or client side. For instance, Firefox has default of
network.http.max-connections-per-server
= 15 (see here) while you have >70 files to be downloaded in your domain and next 40 from Facebook.You can reduce number of loaded images by generating sprites i.e. the image consisting of multiple small images, and then using CSS to diplay them properly in places that you want. This is widely used e.g. by Google - see http://www.google.com/images/nav_logo83.png