当用户打开你的网站的时候,服务器就要处理一些HTTP请求,加载网页中的每个元素(比如图片,script代码)都要花费时间,如果元素非常多的话,加到一起,可能需要花费几秒钟的时间。
减少HTTP请求的第一步就是要减少网页中的元素,去掉不必要的图片,header项,style值等。如果相连的2个图片可以合并的话,就尽量减少图片元素个数。
其次尽量将加载的外部文件和代码合并到一个文件中,比如将几个CSS文件,
合并成一个:
原文:Speed Up Your Site: Reduce the HTTP Requests
译文:网站速度优化系列:减少HTTP请求
翻译:sorryle
网站速度优化系列:
1. 图片优化
2. 图片格式
3.CSS 优化
4. 链接地址细节优化
5. 使用width和height标签
6. 减少HTTP请求
3 Responses
minidxer
January 17th, 2008 at 2:37 pm
1Good!
漫步
January 17th, 2008 at 3:09 pm
2不错….
网站速度优化系列:图片格式
January 17th, 2008 at 10:41 pm
3[...] 2. 图片格式 3.CSS 优化 4. 链接地址细节优化 5. 使用width和height标签 6. 减少HTTP请求 sorryle on January 13, 2008 | Posted in [...]
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Popular Posts