简体   繁体   English

如何确定网站的加载时间

[英]How to determine the loading time of website

我正在为客户创建专业的网站,这是我的第一个项目,并且我使用了太多的库,例如Velocity.js,jquery,jquery.ui,animate.css,还有一些用于jquery的图像滑块插件,现在我正在使用min版本和所有文件都已下载到我的计算机中,但是当我将网站启用时,它将严重影响网站的加载时间,还是正常的。

You can put it up. 你可以把它放起来。 Test it Click here . 测试单击此处 But the best way is to put it up and test the ping. 但是最好的方法是安装它并测试ping。

Yes, it will severely affect the loading of the page. 是的,它将严重影响页面的加载。 Chrome comes with developer tools out of the box, and Firebug for Firefox is only a couple of clicks away. Chrome附带了开箱即用的开发人员工具,只需单击几下鼠标,即可使用Firefox的Firebug。 That, combined with the RTT time and badnwidth to the site gives you enough information to calculate exactly how slow the first hit page load time. 这样,再加上网站的RTT时间和badnwidth,可以为您提供足够的信息来准确计算首次点击页面加载时间的速度。

Assuming that caching is configured correctly, subsequent page transitions should be faster - but even loading all this javascript from cache and parsing it will have a big impact on the load time. 假设缓存配置正确,则后续页面转换应该更快-但即使从缓存中加载所有这些javascript并对其进行解析也将对加载时间产生重大影响。 Note that in the of Dokuwiki, the CMS already handles merging of javascript into a single file. 请注意,在Dokuwiki中,CMS已将javascript合并到单个文件中。

Using PJax or similar will help with subsequent transitions. 使用PJax或类似方法将有助于后续转换。 Using online repositories for standard libraries does not help with performance. 将在线存储库用于标准库对性能没有帮助。 Minimizing the javascript does not give very big wins (since you are already compressing the files on the fly, aren't you?) 最小化javascript不会带来很大的收益(因为您已经在动态压缩文件了,不是吗?)

There's big wins to be had from defering Javascript loading and stripping/optimizing/merging CSS files. 推迟Javascript的加载以及剥离/优化/合并CSS文件有一个巨大的成功。

There are a lot of other things you can do to make your page render faster - but space here is too limited. 您可以做很多其他事情来使页面渲染更快-但是这里的空间太有限了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM