in Programming, Web

Rules for optimal web site performance

I’ve been working to improve the performance a large site at Amazon.  Steve Souders has written two excellent books that explain browser/http best practices.  A few of the rules were new to me and very helpful (flushing/mod_deflate settings, different browser techniques to defer Javascript).  The important take-away is that only a small fraction of typical page load time is bottlenecked by the server generation of a page.

High Performance Web Sites
(companion site)

  1. Make Fewer HTTP Requests
  2. Use a Content Delivery Network
  3. Add an Expires 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
  11. Avoid Redirects
  12. Remove Duplicate Scripts
  13. Configure ETags
  14. Make AJAX Cacheable
Even Faster Web Sites
(companion site)

  1. Understanding Ajax Performance
  2. Creating Responsive Web Applications
  3. Splitting the Initial Payload
  4. Loading Scripts Without Blocking
  5. Coupling Asynchronous Scripts
  6. Positioning Inline Scripts
  7. Writing Efficient JavaScript
  8. Scaling with Comet
  9. Going Beyond Gzipping
  10. Optimizing Images
  11. Sharding Dominant Domains
  12. Flushing the Document Early
  13. Using Iframes Sparingly
  14. Simplifying CSS Selectors

My first round of optimizations just went into production and our metric that measures “time from click until critical feature shows up in the browser” dropped from 5.25s to 3.5s. It’s neat to multiply the savings and see that many weeks of end-user browser load time are saved each day.