Monday, June 16, 2008

How to improve performance of our web sites


Here's a list which are recommendated for improving front-end performance of a website:

The Exceptional Performance team has identified a number of best practices for making web pages fast inYahoo. The list includes 34 best practices divided into 7 categories.

1. Page Content

  • Make Fewer HTTP RequestsReduce
  • DNS Lookups
  • Avoid Redirects
  • Make Ajax Cacheable
  • Post-load Components
  • Preload Components
  • Reduce the Number of DOM Elements
  • Split Components Across Domains
  • Minimize the Number of iframes
  • No 404s

2. Server Operation

  • Use a Content Delivery Network
  • Add an Expires or a Cache-Control Header
  • Gzip Components
  • Configure ETags
  • Flush the Buffer Early
  • Use GET for AJAX Requests

3. Cookies

  • Reduce Cookie Size
  • Use Cookie-free Domains for Components

4. CSS

  • Put Stylesheets at the Top
  • Avoid CSS Expressions
  • Make JavaScript and CSS External
  • Minify JavaScript and CSS
  • Choose <link> over @import
  • Avoid Filters

5. Java Script

  • Put Scripts at the Bottom
  • Make JavaScript and CSS External
  • Minify JavaScript and CSS
  • Remove Duplicate Scripts
  • Minimize DOM Access
  • Develop Smart Event Handlers

6. Images

  • Optimize Images
  • Optimize CSS Sprites
  • Don't Scale Images in HTML
  • Make favicon.ico Small and Cacheable

7. Mobile

  • Keep Components under 25K
  • Pack Components into a Multipart Document

I got this short list from the book "OReilly High Performance Web Sites" by Steve Souders, Chief Performance Yahoo. Download ebook here.

Happy Programming!!!