HighPerformanceWebSites

Cookies keep cookie sizes low set cookies at

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: page views with empty cache percentage 70.0% 60.0% On the first day no one has the images cached, but over time more people have the image until a steady state is reached; Result: 40-60% of yahoo users have an empty cache and % of page views with an empty cache is 20% 50.0% 40.0% 30.0% 20.0% 10.0% 0.0% 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 day of experiment Copyright 2009 - 2013 Horowitz 8 Impact of Cookies on Response Time Cookie Size 4me Delta 0 bytes 78ms 0ms 500 bytes 79ms +1 ms 1000 bytes 94ms +16ms 1500 bytes 109ms +31ms 2000 bytes 125ms +47ms 2500 bytes 141ms +63ms 3000 bytes 156ms +78ms ms:= millisecond Copyright 2009 - 2013 Horowitz 9 Analysis of Cookie Sizes Across the Web Website total Cookie Size Amazon 60 bytes Google 72 bytes Yahoo 122 bytes Cnn 184 bytes Youtube 218 bytes msn 268 bytes eBay 331 bytes MySpace 500 bytes Lessons •  eliminate unnecessary cookies •  keep cookie sizes low •  set cookies at appropriate domain level •  set Expires date appropriately an earlier date or none removes the cookie sooner Experiment in Firefox: click on Tools | Options | Privacy | Use Custom Settings and select “ask me every time” for cookies. Then load www.myspace.com Copyright 2009 - 2013 Horowitz 10 The “iniOal” 14 Rules 1.  Make fewer HTTP requests 2.  Use a CDN (content distribuOon network) 3.  Add an Expires header 4.  Gzip components 5.  Put stylesheets at the top 6.  Move scripts to the bolom 7.  Avoid CSS expressions 8.  Make JS and CSS external 9.  Reduce DNS lookups 10.  Minify JS 11.  Avoid redirects 12.  Remove duplicate scripts 13.  Configure Etags 14.  Make AJAX cacheable Details on all of the rules to follow Copyright 2009 - 2013 Horowitz 11 Rule 1: Make fewer HTTP requests •  Most...
View Full Document

Ask a homework question - tutors are online