Tips for Faster Web Pages

I just stumbled across a nice list of tips for speeding up your web site. At Yahoo! this is job #1, and most of the tricks we use are included in this list: Marcelo Calbucci posted it on his blog in November, but tips like these don’t really get outdated.

Here are the tip titles and some notes from me (in italics), but head over to his site to get all the details:

  • Tip #1: Strip spaces, tabs, CR/LF from the HTML – I think attribute quotes are worth the weight, as they reduce development bugs over time. If possible, use a build process to keep both commented development versions and efficient minimized production versions.
  • Tip #2: Don’t use XHMTL – I tend to agree. From a performance perspective clearly, but controversial in general
  • Tip #3: Keep Cookies Small – yep
  • Tip #4: Keep JavaScript Small – and efficient, and modular
  • Tip #5: Use Public Caching – do it if you can, especially if you’re talkin’ real traffic
  • Tip #6: Enable HTTP Compression – this is often “gzip”, but by any means necessary
  • Tip #7: Keep all as much as possible in lower case – yep, and it’s more forward compatible too
  • Tip #8: Avoid Tables – the rendering problems with tables are the most important reason, and the Web Standards folks agree for semantic reasons
  • Tip #9: Set image size – yep. Does anybody know if this is equally efficiently accomplished in CSS declarations and HTML attributes.
  • Tip #10: Compact your GIF/JPG – always important
  • Tip #11: Reduce the number of external elements – yep, though the details — when to combine small page-specific files into one cross-site file — require a bit of case-by-case examination
  • Tip #12: Use a single DNS Lookup – yep
  • Tip #13: Delay Script Starts – this concept is right, but there are more efficient solutions (that i’ll be writing about in a few weeks)
  • Tip #14: Watch for Memory Leak – extra important in these days of heavy javascript development