Monday, May 5, 2008

Website Performance

Or "How to make my website faster?"
Steve Souders says that he is the YSlow creator, which is a Firefox's and Firebug's extension that calcs the conformity degree of a site with th rules for high performance websites. Now he says he got "14" new rules but lists only 10. Now I will list the current 34 YDN rules plus the 10 "new" ones:
  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
  1. Split the initial payload
  2. Load scripts without blocking
  3. Don’t scatter scripts
  4. Split dominant content domains
  5. Make static content cookie-free, repeated
  6. Reduce cookie weight, repeated
  7. Minify CSS, repeated
  8. Optimize images, repeated
  9. Use iframes sparingly, repeated
  10. To www or not to www
I would like to add 2 rules that I readed elsewhere:
  1. Optimize inner loops
  2. Make XHTML web pages
The first one is explainable from the programmer's point of view: the inner loops are the greatest time consumers, and by optimizing them you gain computational time. For articles dealing with how to do that with JS read this and this too.

The second rule applies to mobile web development, where hardware resources are fewer, and complete browsers slowers than browsers that read only XHTML. Visit http://validator.w3.org/ to validate your website.

No comments: