Practices for Speeding up Web Site

80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page:  Images, Style sheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages.

One way to reduce the number of components in the page is to simplify the page’s design. But is there a way to build pages with richer content while also achieving fast response times? Here are some techniques for reducing the number of HTTP requests, while still supporting rich page designs.

Combined files are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all CSS into a single style sheet. Combining files is more challenging when the scripts and style sheets vary from page to page, but making this part of your release process improves response times.

CSS Sprites are the preferred method for reducing the number of image requests. Combine your background images into a single image and use the CSS background-image and background-position properties to display the desired image segment.

Image maps combine multiple images into a single image. The overall size is about the same, but reducing the number of HTTP requests speeds up the page. Image maps only work if the images are contiguous in the page, such as a navigation bar. Defining the coordinates of image maps can be tedious and error prone. Using image maps for navigation is not accessible too, so it’s not recommended.

Reducing the number of HTTP requests in your page is the place to start. This is the most important guideline for improving performance for first time visitors. As described in Tenni Theurer’s blog post Browser Cache Usage – Exposed!, 40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience.

Below given are some more examples for high-speed loading. The list includes 40 best practices they are as follows:

  1. Use a Content Delivery Network
  2. Add an Expires or a Cache-Control Header
  3. Gzip Components
  4. Put Style sheets at the Top
  5. Put Scripts at the Bottom
  6. Avoid CSS Expressions
  7. Make JavaScript and CSS External
  8. Reduce DNS Lookups
  9. Minify JavaScript and CSS
  10. Avoid Redirects
  11. Remove Duplicate Scripts
  12. Configure E Tags
  13. Make Ajax Cacheable
  14. Gzip Components
  15. Reduce DNS Lookups
  16. Minify JavaScript
  17. Avoid Redirects
  18. Flush the Buffer Early
  19. Use GET for AJAX Requests
  20. Post-load Components
  21. Pre-load Components
  22. Reduce the Number of DOM Elements
  23. Split Components Across Domains
  24. Minimize the Number of iframes
  25. No 404s
  26. Reduce Cookie Size
  27. Eliminate unnecessary cookies
  28. Use Cookie-free Domains for Components
  29. Minimize DOM Access
  30. Update nodes “offline” and then add them to the tree
  31. Avoid fixing layout with JavaScript
  32. Develop Smart Event Handlers
  33. Choose <link> over @import
  34. Avoid Filters
  35. Optimize Images
  36. Optimize CSS Sprites
  37. Don’t Scale Images in HTML
  38. Make favicon.ico Small and Cacheable
  39. Keep Components under 25K
  40. Pack Components into a Multipart Document

Social Bookmarking