April 4, 2009
Some following tips are derived from the book High Performance Web Sites (O’Reilly) by Steve Souders:
- Make fewer HTTP requests to reduce object overhead.
- Use a content delivery network.
- Add an Expires header.
- Gzip/compress text components.
- Put stylesheets at the top in the head.
- Put scripts at the bottom of the body.
- Avoid CSS expressions which are CPU-intensive and can be evaluated frequently.
- Reduce Domain Name System (DNS) lookups to reduce the overhead of DNS delay by splitting lookups between two to four unique hostnames.
- Avoid redirects which slow performance. It’s better to CNAME or alias.
- Remove duplicate scripts to eliminate extra HTTP requests in Internet Explorer.
- Configure ETags for sites hosted on multiple servers. FileETag none in Apache removes Etags to avoid improper cache validation.
- Make Ajax cacheable and small to avoid unnecessary HTTP requests.