• Home
  • About the ramblings…

Ramblings of a Short Man

~ Written by Thai Bui, read by… um… millions

Ramblings of a Short Man

Monthly Archives: April 2007

Web 2.0 Expo: High Performance Webpages

15 Sunday Apr 2007

Posted by Thai Bui in Technology, Web 2.0

≈ 2 Comments

Tags

Web 2.0 Expo, Web2Expo, Web2Expo07

I’m attending the Web 2.0 Expo at the Moscone Center in SF this week.  First up is the High Performance Webpages workshop, presented by the Yahoo! Exceptionial Performance team.  Pretty interesting so far.

Their primary thesis is that 80-90% of user-perceived response time is client-side and images; only 5-10% is the actual generation and downloading of HTML.  Even if the user has cached a lot (they’re visitng the page again), the percentages don’t change much.

Some of the interesting facts they’re citing:

  • The percentages cited above (HTML-generation vs. other things in user-perceived response time) is pretty consistent across the 10 biggest properties on the web.
  • 40-60% of unique users visit with Yahoo with an empty cache. ~20% of total page views are with an empty cache; higher than you’d think.
  • Base cookie sizes for some major web properties set at their splash page (in bytes):
    • Amazon  60
    • Google  72
    • Yahoo  122
    • CNN  184
    • YouTube  218
    • MSN  268
    • eBay  331
    • MySpace  500
  • Use at least 2 but no more than 4 aliases (hostnames) for images from a single HTML page because the browser will download 2 objects in parallel per alias.  More aliases leads to CPU thrashing and more DNS lookups.
  • 14 Rules (in rough priority order):
    1. Make fewer HTTP requests
      • Use image maps to reduce # of images.
      • Use CSS sprites; <span style=”background-image: …; background-position: -100px -100px;”>.
      • Use inline images, but not supported in IE; binary of image is in HTML! (The binary is in the HTML?!? Oh my god, that hurts my sensibilities!)
    2. Use a CDN (like Akamai; not practical for small sites)
    3. Add an Expires header (set it far in the future)
    4. Gzip components (not just html files but all non-binary ones of a non-trivial size)
    5. Put CSS at the top
      • Where you’re supposed to, because pages don’t layout until all the .css files are downloaded.
    6. Move JS to the bottom
      • Not where you expect to put it.  Put it as late as possible in the code because downloading .js files block the browsers from parallel downloading of other assets (like images).
    7. Avoid CSS expressions (ones that are calculated off other things; way too much processing)
    8. Make JS and CSS external (this makes it cacheable)
    9. Reduce DNS lookups
    10. Minify JS (“minify” is a word? Huh, I guess it is.  In dev-talk, it means to remove unnecessary whitespace.)
    11. Avoid redirects
    12. Remove duplicate scripts
    13. Turn off ETags
      • Entity tags prevent caching by the browser because ETags are never the same for the same asset across different servers, so for a multi-server farm, it does a lot of harm.
    14. Make AJAX cacheable and small

Update: They posted the presentation; it’s been the best session so far, IMHO.

Advertisement
Newer posts →

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • April 2016
  • September 2014
  • December 2013
  • October 2013
  • July 2013
  • May 2013
  • November 2012
  • January 2012
  • October 2011
  • September 2011
  • August 2011
  • May 2010
  • March 2010
  • January 2010
  • April 2008
  • March 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • September 2006
  • July 2006
  • June 2006
  • March 2006
  • February 2006
  • January 2006

Categories

  • AJAX
  • Analytics
  • Blogging
  • Food
  • Gadgets
  • Homestead
  • Intuit
  • Mobile
  • Patents
  • Recruiting
  • SEO
  • Social Networking
  • Software Development
  • Spam
  • Startups
  • Technology
  • TV/Movies
  • Uncategorized
  • Web 2.0
  • Web 2.0 Expo

Meta

  • Register
  • Log in

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Ramblings of a Short Man
    • Already have a WordPress.com account? Log in now.
    • Ramblings of a Short Man
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar