为了账号安全,请及时绑定邮箱和手机立即绑定

提升网站性能最佳实践

提升网站性能最佳实践---Best Practices for Speeding Up Your Web Site

The Exceptional Performance team has identified a number of best practices for making web pages fast. The list includes 35 best practices divided into 7 categories.

01.Minimize HTTP Requests---减少http请求

  1. simplify the page's design.
    2.Combined files
    3.Image maps
    4.CSS Sprites
    5.Inline images---are not yet supported across all major browsers.

    02.Use a Content Delivery Network---利用内容分发网络

    请记住,最终用户响应时间的80-90%用于下载页面中的所有组件:图像,样式表,脚本,Flash等。这是性能黄金规则。 而不是开始重新设计您的应用程序架构的艰巨任务,最好先分散您的静态内容。 这不仅实现了响应时间的更大减少,但是由于内容交付网络更容易。

    03.Add an Expires or a Cache-Control Header---添加过期或Cache-Control头

    Browsers (and proxies) use a cache to reduce the number and size of HTTP requests, making web pages load faster.

    04.Gzip Components---Gzip组件

05.Put Stylesheets at the Top---样式单置顶

06.Put Scripts at the Bottom---脚本置底

07.Avoid CSS Expressions---避免css表达式

08.Make JavaScript and CSS External---外置js和css

09.Reduce DNS Lookups---减少DNS查找

10.Minify JavaScript and CSS---缩小js,css

11.Avoid Redirects---避免重定向

12.Remove Duplicate Scripts---移除重复脚本

13.Configure ETags---配置ETages

14.Make Ajax Cacheable---让ajax可缓存

15.Flush the Buffer Early---尽早清理缓存

16.Use GET for AJAX Requests---利用GET做ajax请求

17.Post-load Components---后加载组件

18.Preload Components---前加载组件

19.Reduce the Number of DOM Elements---减少DOM元素数量

20.Split Components Across Domains----跨域分割组件

21.Minimize the Number of iframes---减少iframs数量

22.No 404s

23.Reduce Cookie Size

24.Use Cookie-free Domains for Components

25.Minimize DOM Access

26.Develop Smart Event Handlers

27.Choose <link> over @import

28.Avoid Filters

29.Optimize Images

30.Optimize CSS Sprites

31.Don't Scale Images in HTML

31.Make favicon.ico Small and Cacheable

33.Keep Components under 25K

34.Pack Components into a Multipart Document

35.Avoid Empty Image src

点击查看更多内容
2人点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
Web前端工程师
手记
粉丝
7244
获赞与收藏
3476

关注作者,订阅最新文章

阅读免费教程

感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消