Apache网站性能优化方案
2011-07-20 17:29
148 查看
在 Yahoo 开发者网站上,Yahoo 提出了优化网站性能的N条规则(Best Practices for Speeding Up Your Web Site)。这些规则是: 1. 尽可能的减少 HTTP 的请求数(Minimize HTTP Requests) —— Tag: content
2. 使用 CDN(Use a Content Delivery Network) —— Tag: server
3. 添加 Expires 头(或者 Cache-control ) (Add an Expires or a Cache-Control Header) —— Tag: server
4. Gzip 组件(Gzip Components) —— Tag: server
5. 将 CSS 样式放在页面的上方 (Put Stylesheets at the Top) —— Tag: css
6. 将脚本移动到底部(包括内联的)(Put Scripts at the Bottom) —— Tag: javascript
7. 避免使用 CSS 中的 Expressions(Avoid CSS expressions) —— Tag: css
8. 将 JavaScript 和 CSS 独立成外部文件(Make JS and CSS external) —— Tag: javascript, css
9. 减少 DNS 查询 (Reduce DNS lookups) —— Tag: content
10. 压缩 JavaScript 和 CSS ( Minify JS) —— Tag: javascript, css
11. 避免重定向(Avoid redirects) —— Tag: server
12. 移除重复的脚本(Remove duplicate scripts) —— Tag: javascript
13. 配置实体标签(Configure ETags) —— Tag: css
14. 使 AJAX 缓存(Make Ajax Cacheable) —— Tag: content
15. 提前刷新输出缓冲(Flush the Buffer Early) —— Tag: server
16. Use GET for AJAX Requests —— Tag: server
17. Post-load Components —— Tag: content
18. ……
最开始 Yahoo 提出了 14 条规则(所以到现在搜索到的资料大多是叫“YAHOO 优化网站性能的14条规则”),后来 Yahoo 不断完善添加,到今天我写这篇文章 http://www.xiaohui.com/dev/server/speeding-up-your-web-site.htm 的时候,已经有 34 条规则了,覆盖了server、CSS、javascript等七个大类。需要了解的可以在 Yahoo Developer 英文站上了解。
Yahoo 同时提供了一个 FireFox 插件 YSlow,可以直观、方便的看到你的网站根据前13条优化规则的建议。关于这 13 条优化规则的中文说明,感兴趣的可以直接参考 Yaosl 的文章:优化网站性能 提高网站速度访问速度的14条实践。他这里说得比较详细。
2. 使用 CDN(Use a Content Delivery Network) —— Tag: server
3. 添加 Expires 头(或者 Cache-control ) (Add an Expires or a Cache-Control Header) —— Tag: server
4. Gzip 组件(Gzip Components) —— Tag: server
5. 将 CSS 样式放在页面的上方 (Put Stylesheets at the Top) —— Tag: css
6. 将脚本移动到底部(包括内联的)(Put Scripts at the Bottom) —— Tag: javascript
7. 避免使用 CSS 中的 Expressions(Avoid CSS expressions) —— Tag: css
8. 将 JavaScript 和 CSS 独立成外部文件(Make JS and CSS external) —— Tag: javascript, css
9. 减少 DNS 查询 (Reduce DNS lookups) —— Tag: content
10. 压缩 JavaScript 和 CSS ( Minify JS) —— Tag: javascript, css
11. 避免重定向(Avoid redirects) —— Tag: server
12. 移除重复的脚本(Remove duplicate scripts) —— Tag: javascript
13. 配置实体标签(Configure ETags) —— Tag: css
14. 使 AJAX 缓存(Make Ajax Cacheable) —— Tag: content
15. 提前刷新输出缓冲(Flush the Buffer Early) —— Tag: server
16. Use GET for AJAX Requests —— Tag: server
17. Post-load Components —— Tag: content
18. ……
最开始 Yahoo 提出了 14 条规则(所以到现在搜索到的资料大多是叫“YAHOO 优化网站性能的14条规则”),后来 Yahoo 不断完善添加,到今天我写这篇文章 http://www.xiaohui.com/dev/server/speeding-up-your-web-site.htm 的时候,已经有 34 条规则了,覆盖了server、CSS、javascript等七个大类。需要了解的可以在 Yahoo Developer 英文站上了解。
Yahoo 同时提供了一个 FireFox 插件 YSlow,可以直观、方便的看到你的网站根据前13条优化规则的建议。关于这 13 条优化规则的中文说明,感兴趣的可以直接参考 Yaosl 的文章:优化网站性能 提高网站速度访问速度的14条实践。他这里说得比较详细。
相关文章推荐
- 网站性能优化之Apache调整
- 优化网站性能的6种架构方案
- 网站性能优化-apache
- 优化网站性能必备的6种架构方案,你知道吗?
- 大企业网站性能优化必备方案之“懒加载技术”
- 优化网站性能必备的6种架构方案,你知道吗?
- 网站性能优化之Apache调整
- 优化网站性能必备的6种架构方案
- 优化网站性能必备的6种架构方案
- 【nginx网站性能优化篇(2)】反向代理实现Apache与Nginx的动静分离(LNMPA)
- 网站性能优化之Apache调整
- 优化网站性能必备的6种架构方案,你知道吗?
- 优化网站性能必备的6种架构方案
- 优化网站性能必备的6种架构方案
- 上海航空网站注册表单优化方案
- mysql 性能优化方案 (转)
- 【整理】asp.net2.0网站性能优化解决方案
- 从12306.cn谈大网站架构与性能优化
- 整理网站优化(SEO)的方案