2012年9月6日

[YAHOO!] Best Practices for Speeding Up Your Web Site 快速分類導覽



參考yahoo的Best Practices for Speeding Up Your Web Site
(http://developer.yahoo.com/performance/rules.html)

目前一共有35條 Rule (2012.09.06)

1.  Make Fewer HTTP Requests                  
2.  Use a Content Delivery Network (CDN)      
3.  Add Expires or Cache-Control Header       
4.  Gzip Components                           
5.  Put Stylesheets at Top                    
6.  Put Scripts at 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 Buffer Early                        
16. Use GET for Ajax Requests                 
17. Postload Components                       
18. Preload Components                        
19. Reduce the Number of DOM Elements         
20. Split Components Across Domains           
21. Minimize Number of iframes                
22. Avoid 404s                                
23. Reduce Cookie Size                        
24. Use Cookie-Free Domains for Components    
25. Minimize DOM Access                       
26. Develop Smart Event Handlers              
27. Choose Over @import          
28. Avoid Filters                             
29. Optimize Images                           
30. Optimize CSS Sprites                      
31. Do Not Scale Images in HTML               
32. Make favicon.ico Small and Cacheable      
33. Keep Components Under 25 KB               
34. Pack Components Into a Multipart Document 
35. Avoid Empty Image src         
            

透過該頁的原始碼,看到針對rule
分類標籤

分類後,除了方便記憶,也可以針對特定的部分作強化

列出如下:

[Content]
1. Make Fewer HTTP Requests                   
2. Reduce DNS Lookups                        
3. Avoid Redirects                           
4. Make Ajax Cacheable                       
5. Postload Components                       
6. Preload Components                        
7. Reduce the Number of DOM Elements         
8. Split Components Across Domains           
9. Minimize Number of iframes                
10. Avoid 404s                                  

[Cookie]
1. Reduce Cookie Size                        
2. Use Cookie-Free Domains for Components   


[CSS]
1. Put Stylesheets at Top                    
2. Avoid CSS Expressions                     
3. Choose Over @import          
4. Avoid Filters      


[Images]
1. Optimize Images                       
2. Optimize CSS Sprites                  
3. Do Not Scale Images in HTML           
4. Make favicon.ico Small and Cacheable    


[JavaScript]
1. Put Scripts at Bottom            
2. Remove Duplicate Scripts                  
3. Minimize DOM Access                       
4. Develop Smart Event Handlers  


[JavaScript&css]
1.  Make JavaScript and CSS External          
2. Minify JavaScript and CSS 
       

[Mobile]
1. Keep Components Under 25 KB            
2. Pack Components Into a Multipart Document


[Server]
1. Use a Content Delivery Network (CDN)      
2. Add Expires or Cache-Control Header       
3. Gzip Components                           
4. Configure ETags                           
5. Flush Buffer Early                        
6. Use GET for Ajax Requests                 
7. Avoid Empty Image src