您的位置:首页 > 运维架构 > 网站架构

Google的网站性能优化最佳实践

2013-10-31 11:06 323 查看

网站性能最佳实践

 

当描述一个web页面的页面速度,评价的一致性遵循许多不同的规则。这些规则是任何阶段的web开发可以应用的前端最佳实践。这个文档的每个规则都陈述于此,无论你是否运行页面测速工具——或许你只是开发一个全新的网站,不准备测试它——你都可以任何时间参考这里的规则。我们给你具体的技巧和建议, 使你可以使用最好的实践规则并将其贯彻到您的开发过程中。

 

关于性能最佳实践

 

从客户端的角度看网站性能评估,通常衡量的是页面加载时间。这是一个用户开始发起一个请求新页面到页面完全呈现所耗费的时间。最好的实践涵盖许多涉及的步骤,包括页面加载时间,包括解析DNS名称,建立TCP连接,传输HTTP请求、下载资源、从缓存中获取资源,解析和执行脚本,并呈现在页面上的对象。基本上页面速度评估的是,您的页面或者部分消除这些步骤,将它们并行化,缩短它们完成的时间。最好的做法可以分成六个类别的不同方面来讨论,它们都涉及页面加载优化:

Optimizing caching — keeping your application's data and logic off the network altogether
Minimizing round-trip times — reducing the number of serial request-response cycles
Minimizing request overhead — reducing upload size
Minimizing payload size — reducing the size of responses, downloads, and cached pages
Optimizing browser rendering — improving the browser's layout of a page
Optimizing for mobileNew! — tuning a site for the characteristics of mobile networks and mobile devices

 

更多资源:

For more detailed information on many of the best practices described in these pages, see Steve Souders' High Performance Web Sites and Even Faster Web Sites.
For running code examples that illustrate the techniques described in these pages, see the companion website, 14 Rules for Faster-Loading Web Sites.
For a runnable test and summary comparison of browsers' behavior on many of the metrics discussed in these pages, see Browserscope.
 

 

本文链接:

https://developers.google.com/speed/docs/best-practices/rules_intro?hl=da
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: