校内怎么这么慢
作者:yaya | 时间:2009年10月2日 | 分类 学海无涯 | 标签 校内 慢 YSlow | 1回复
上校内,发现校内现在真的是太慢了啊。感觉以前似乎没这么慢吧。
开个页面等很长的时间,然后还要一直加载...
到底怎么回事。
不多说,直接用YSlow看看。
Grade F on Make fewer HTTP requests
This page has 4 external Javascript scripts. Try combining them into one.
This page has 4 external stylesheets. Try combining them into one.
This page has 44 external background images. Try combining them with CSS sprites.Grade F on Use a Content Delivery Network (CDN)
There are 100 static components that are not on CDN.
Grade F on Compress components with gzip
There are 10 plain text components that should be sent compressed
Grade F on Reduce DNS lookups
The components are split over more than 4 domains
Grade F on Reduce the number of DOM elements
There are 2123 DOM elements on the page
这几点是最严重的原因。
而校内竟然没有做css sprites,使得像
这样的gif,每次都要一个请求。而我们知道,在“你正在干嘛?”里面是有很多的。以及js/css一大堆(功能太强大了)。
而CDN,简单说就是个特别的镜像,它比一般的聪明,并且具有缓存,流量导流等功能。就是让你速度更快。
我们看到,在F级别里面,除了CDN这东西是要钱的,其他的都可以改进编码及其他方式来得以提高的(当然,也要花钱,维护,运营,更新...加班费算不算,哈哈)。
就写到这里了。
