网站优化--加快页面加载速度(一)

《Best Practices for Speeding Up Your Web Site》定义的34条规则:

1.    Make Fewer HTTP Requests
2.    Use a Content Delivery Network
3.    Add an Expires or a Cache-Control Header
4.    Gzip Components
5.    Put Stylesheets at the Top
6.    Put Scripts at the Bottom
7.    Avoid CSS Expressions
8.    Make JavaScript and CSS External
9.    Reduce DNS Lookups
10.   Minify JavaScript and CSS
11.   Avoid Redirects
12.   Remove Duplicate Scripts
13.   Configure ETags
14.   Make Ajax Cacheable
15.   Flush the Buffer Early
16.   Use GET for AJAX Requests
17.   Post-load Components
18.   Preload Components
19.   Reduce the Number of DOM Elements
20.   Split Components Across Domains
21.   Minimize the Number of iframes
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
32.   Make favicon.ico Small and Cacheable
33.   Keep Components under 25K
34.   Pack Components into a Multipart Document

中文对照:

01.减少的http请求
02.使用CDN (内容分发网络)
03.指定过期时间
04.压缩结构(GZIP)
05.样式表文件放在顶部
06.脚本放在底部
07.不在css中使用表达式
08.将javascript和css文件分离到单独的文件
09.减少dns查询
10.精简javascript代码
11.避免重定向
12.去掉多余的脚本
13.配置实体标签
14.可缓存的ajax

 

你可能感兴趣的:(网站优化)