谷歌YSlow准则
YSlow能够对网站的页面进行分析,并告诉你为了提升网站性能,如何基于某些规则而进行优化。javascript
测试我的站点
经过测试我的站点能够得到下面的数据
css
23条准则
Make fewer HTTP requests
译为:减小HTTP请求次数html
Use a Content Delivery Network (CDN)
译为:使用CDNjava
Avoid empty src or href
译为:避免空的src和hrefajax
译为:为文件头指定Expiresexpress
Compress components with gzip
译为:使用gzip压缩内容缓存
Put CSS at top
译为:把CSS放在顶部cookie
Put JavaScript at bottom
译为:把CSS放在顶部dom
Avoid CSS expressions
译为:避免使用CSS表达式性能
Make JavaScript and CSS external
译为:将CSS和JS放到外部文件中
Reduce DNS lookups
译为:减小DNS查找次数
Minify JavaScript and CSS
译为:压缩js与css文件
Avoid URL redirects
译为:避免跳转
Remove duplicate JavaScript and CSS
译为:删除重复的JS和CSS
译为:配置ETags
Make AJAX cacheable
译为:可缓存的AJAX
Use GET for AJAX requests
译为:使用GET来完成AJAX请求
Reduce the number of DOM elements
译为:减小DOM元素数量
Avoid HTTP 404 (Not Found) error
译为:避免404错误
Reduce cookie size
译为:减小Cookie的大小
Use cookie-free domains
译为:使用无cookie的域
Avoid AlphaImageLoader filter
译为:不要使用滤镜
Do not scale images in HTML
译为:不要在HTML中缩放图片
Make favicon small and cacheable
译为:缩小favicon.ico并缓存