<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Learning the World &#187; book:isbn=0596529309</title>
	<atom:link href="http://learningtheworld.eu/tag/bookisbn0596529309/feed/" rel="self" type="application/rss+xml" />
	<link>http://learningtheworld.eu</link>
	<description></description>
	<lastBuildDate>Tue, 06 Nov 2012 00:17:33 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Web Performance Optimization (WPO)</title>
		<link>http://learningtheworld.eu/2010/web-performance-optimization/</link>
		<comments>http://learningtheworld.eu/2010/web-performance-optimization/#comments</comments>
		<pubDate>Tue, 18 May 2010 15:00:37 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[aol]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[book:isbn=0596522304]]></category>
		<category><![CDATA[book:isbn=0596529309]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[netflix]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[shopzilla]]></category>
		<category><![CDATA[steve souders]]></category>
		<category><![CDATA[talks]]></category>
		<category><![CDATA[web performance optimization]]></category>
		<category><![CDATA[webmontag]]></category>
		<category><![CDATA[wpo]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=929</guid>
		<description><![CDATA[Yesterday I held a talk at the Webmontag in Frankfurt about web performance optimization. According to the prophecy <acronym>WPO</acronym> will become an industry like <acronym title="Search Engine Optimization">SEO</acronym> in the near future. Tenni Theurer and Steve Souders began to examine the performance of websites at Yahoo! in 2003, I learned about it in 2006 from Nate Koechley and subsequently blogged about it. […]]]></description>
				<content:encoded><![CDATA[<p>Yesterday I held a talk at the <a href="http://webmontag.de/location/frankfurt/">Webmontag in Frankfurt</a> about <strong>web performance optimization</strong>. According to the prophecy <acronym>WPO</acronym> will become an industry like <acronym title="Search Engine Optimization">SEO</acronym> in the near future. Tenni Theurer and Steve Souders began to examine the performance of websites at Yahoo! in 2003, I learned about it in 2006 from <a href="/2006/atmedia-day-two/#koechley">Nate Koechley</a> and <a href="/2007/performance/">subsequently</a> <a href="/2007/performance-2/">blogged</a> about it. In the meantime Souders published two books about the topic and works today at Google.</p>

<p><object type="application/x-shockwave-flash" data="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webmontag-performance-2010-100516152854-phpapp01&#038;stripped_title=performancewmfra" width="500" height="412" style="margin-bottom: 1em;"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webmontag-performance-2010-100516152854-phpapp01&#038;stripped_title=performancewmfra" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/></object></p>

<p>The goal of web performance optimization is to become faster and smaller: research at Yahoo! and Google found that just 10-20% of the perceived loading time is caused by the server. A few years ago we thought performance was exclusively connected to the server. However, 80-90% of the loading time incurs in the frontend. Thus <acronym>WPO</acronym> is more efficient targeting the frontend.</p>

<p>Two important weak points are JavaScript files and the sheer number of files: JavaScript loads sequentially and blocks subsequent code until each file is loaded. Hence it shouldn&rsquo;t be located in the head, but in the foot of a page. Secondly older browsers, in particular Internet Explorer, will only load 2-4 files in parallel. Files queue up and get processed when it&rsquo;s their turn. Therefore aggregation of files is used for reducing the number of HTTP requests.</p>

<p>Several international companies have conducted research or just tracked the effects of optimization.</p>

<h3>Effects of slowness</h3>

<ul><li><strong>Amazon:</strong> 100 ms delay caused a <a href="http://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20.html">1% drop in revenue</a>.</li>
<li><strong>Google:</strong> 400 ms delay caused a <a href="http://en.oreilly.com/velocity2009/public/schedule/detail/8523">0.59% decrease in search requests</a> per user (earlier tests list larger numbers).</li>
<li><strong>Yahoo!:</strong> 400 ms delay caused a <a href="http://slideshare.net/stoyan/dont-make-me-wait-or-building-highperformance-web-applications">5-9% decrease in traffic</a>.</li>
<li><strong>Bing:</strong> 2 seconds delay caused a <a href="http://en.oreilly.com/velocity2009/public/schedule/detail/8523">4.3% drop in revenue</a> per user.</li>
</ul>

<h3>Effects of speed</h3>

<ul><li><strong>Mozilla</strong> made their download page 2.2 seconds faster and was rewarded with an <a href="http://blog.mozilla.com/metrics/category/website-optimization">increase of 15.4% in downloads</a>.</li>
<li><strong>Google Maps</strong> reduced the file volume by 30% and observed a <a href="http://news.cnet.com/8301-10784_3-9954972-7.html">30% increase in map requests</a>.</li>
<li><strong>Netflix</strong> enabled gzip on the server; simply by this single action pages became 13-25% faster and <a href="http://en.oreilly.com/velocity2008/public/schedule/detail/3632">saved 50% of traffic volume</a>!</li>
<li><strong>Shopzilla</strong> succeeded in reducing the loading time from 7 down to 2 seconds, whereby the <a href="http://en.oreilly.com/velocity2009/public/schedule/detail/7709">conversion rate increased by 7-12%</a>, they observed a 25% increase in page requests, they were able to retire 50% of their servers, thus <a href="http://www.stevesouders.com/blog/2008/03/06/how-green-is-your-web-page/">saving energy costs</a>.</li>
<li><strong>AOL</strong> observed the <a href="http://scribd.com/doc/16878352/The-Secret-Weapons-of-the-AOL-Optimization-Team">number of page views</a> on several websites. While the fastest users requested 7-8 pages, the slowest only viewed 3-4.</li></ul>

<p>As a cream topping <strong>Google</strong> recently announced to factor in the <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">site speed as a parameter in web search ranking</a>.</p>

<p>Eventually pages become faster, clients are happy, generate more revenue and page views, while power consumption and CO<sub>2</sub> emissions decrease. Saved the world, again! And if you&rsquo;d like to contribute, start by checking the <a href="http://developer.yahoo.com/performance/rules.html">rules at Yahoo!</a> A few tricks beyond that can be found in the presentation which will be translated soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2010/web-performance-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>@media 2008</title>
		<link>http://learningtheworld.eu/2008/atmedia-2008/</link>
		<comments>http://learningtheworld.eu/2008/atmedia-2008/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 20:00:18 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[AMEE]]></category>
		<category><![CDATA[Andy Clarke]]></category>
		<category><![CDATA[atmedia]]></category>
		<category><![CDATA[atmedia2008]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[book:ean=9780596529307]]></category>
		<category><![CDATA[book:isbn=0596529309]]></category>
		<category><![CDATA[book:isbn=0975240293]]></category>
		<category><![CDATA[carbon footprint]]></category>
		<category><![CDATA[comics]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dan Rubin]]></category>
		<category><![CDATA[Edenbee]]></category>
		<category><![CDATA[Frontend Engineering]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[James Graham]]></category>
		<category><![CDATA[jaws]]></category>
		<category><![CDATA[John Resig]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Lachlan Hunt]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[Nate Koechley]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Rich Schwerdtfeger]]></category>
		<category><![CDATA[Richard Schwerdtfeger]]></category>
		<category><![CDATA[upcoming:event=318308]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=105</guid>
		<description><![CDATA[I had the chance to visit the <strong>@media conference in London</strong> again, for the third time. Again it was different than the last times. Perhaps less spectacular, a little less people, no real revelation. There were excellent talks inside the halls, but the best talks happened outside. Like speaking with Nate Koechley about&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/martin-kliehm/2560737021/in/set-72157605494499216/"><img src="/wp-content/uploads/2008/06/panel" width="210" height="158" alt="@media Hot Topics Panel" class="floatleft" /></a> I had the chance to visit the <strong>@media conference in London</strong> again, for the third time. Again it was different than the last times. Perhaps less spectacular, a little less people, no real revelation. There were excellent talks inside the halls, but the best talks happened outside. Like speaking with <strong><a href="http://nate.koechley.com">Nate Koechley</a></strong> about accessible <a href="/2008/captioning-youtube-with-dfxp/">video captioning</a> with a <acronym title="World Wide Web Consortium">W3C</acronym> <acronym title="Extensible Markup Language">XML</acronym> standard that exists for exactly that purpose. There are video tutorials on the Yahoo! Developer Network that would be great test objects. Imagine the impact crowdsourced captioning for video content on flickr or YouTube could have on accessibility! Or I learned from <strong>David Storey</strong> that Opera is working on a curriculum together with the Web Standards Project. Interesting because there have been <a href="http://www.idcnet.info">similar approaches</a> financed by the European Commission, and it would be good to get them talk to each other. Meeting <strong>Steve Faulkner</strong> whose <a href="http://www.paciellogroup.com/resources/wat-ie-about.html">Accessibility Toolbar</a> I helped translating into German. Or just speaking with Antonia Hyde, Christian Heilmann, Fabio Carriere, Henny Swan, <a href="http://www.accessify.com">Ian Lloyd</a>, Lachlan Hunt, Patrick H. Lauke, Richard Ishida, and a few others about standards, accessibility, and internationalization. I admit it. I&rsquo;m a geek, I can&rsquo;t smalltalk.</p>

<p><a href="http://www.flickr.com/photos/martin-kliehm/2560723617/in/set-72157605494499216/"><img src="/wp-content/uploads/2008/06/ian-lloyd" width="210" height="158" alt="dir=rtl: Ian Lloyd, David Storey, Lachlan Hunt" class="floatleft" /></a> I started my conference program with a <strong>case study by the <acronym>BBC</acronym></strong>. They did a redesign and managed to squeeze formerly 60 images into 3 sliding doors and sprites. Their home page is now under 300<abbr title="Kilobyte">K</abbr> and 30 <acronym>HTTP</acronym> requests. Nice to see <a href="/2007/performance-2/">Yahoo&rsquo;s Exceptional Performance</a> guidelines go mainstream. About 5% of their users access the site without JavaScript. They don&rsquo;t get identical features, but they get identical care. For them accessibility isn&rsquo;t a buzzword, it&rsquo;s become a natural part of their daily work. So they were able to find out that <code>blur()</code> is not a friend with JAWS. Also the <acronym>BBC</acronym> plays well with the other kids: they joined the OpenID foundation, and with <a href="http://backstage.bbc.co.uk"><acronym>BBC</acronym> backstage</a> they open their content through an <acronym>API</acronym>. Another charming idea is their <strong>public beta</strong> where people can testdrive new features. About 60% have personalized their home page, although one of the speakers described the personalization features with &ldquo;my mom&rsquo;s head exploded.&rdquo; They used agile development with 2 week sprints, run the website in 12 languages, but don&rsquo;t have a <acronym title="Content Distribution Network">CDN</acronym> yet because of the license fees.</p>

<p>Another case study about the <acronym title="Lifestyle of Health and Sustainability">LOHAS</acronym> community <strong>Edenbee</strong> wasn&rsquo;t <em>that</em> exiting, mostly because I knew the platform <a href="http://edenbee.com/users/martin/">since beta</a> and didn&rsquo;t get quite why I should speak with other people about changing their lightbulbs. But it&rsquo;s nice to keep track of your carbon footprint, a feature that uses the <a href="http://www.amee.cc">AMEE</a> open <acronym>API</acronym>.</p>

<p>I was curious about <strong><a href="http://www.w3.org/html/wg/html5/"><acronym title="Hypertext Markup Language">HTML</acronym>&nbsp;5</a></strong>, so I went to the presentation of Lachlan Hunt and James Graham. Still I don&rsquo;t see any advantage of having a bunch of new elements that are incompatible with older browsers when I can achieve the same with <acronym title="Accessible Rich Internet Applications">ARIA</acronym> attributes. But I understand the rationale behind some of their decisions, although that doesn&rsquo;t mean I come to the same conclusions.</p>

<p>For example people use a lot of &ldquo;nav&rdquo; and &ldquo;menu&rdquo; classes. To make their live easier, the <acronym>WHATWG</acronym> came up with the idea to create a <code>nav</code> element. A block level element, so you wouldn&rsquo;t have to use those <code>&lt;div class=&quot;nav&quot;&gt;</code> any more. But every time I use something like <code>class=&quot;navigation&quot;</code> it will be an unordered list! I don&rsquo;t need another <code>div</code>, I&rsquo;m perfectly happy with my <code>ul</code> and <code>role=&quot;navigation&quot;</code>. It&rsquo;s truly backward compatible, it&rsquo;s semantic, I can use it today, and there isn&rsquo;t a steep learning curve.</p>

<p><a href="http://www.flickr.com/photos/martin-kliehm/2561565004/in/set-72157605494499216/"><img src="/wp-content/uploads/2008/06/comic-panel" width="210" height="153" alt="Concrete Comic Panel" class="floatleft" /></a><a href="http://www.flickr.com/photos/martin-kliehm/2560740717/in/set-72157605494499216/"><img src="/wp-content/uploads/2008/06/andy-clarke" width="210" height="171" alt="Andy Clarke&rsquo;s design" class="floatleft clear" /></a> Then I went to two <strong>design talks by Andy Clarke and Dan Rubin</strong>, and though their designs were beautiful, the code examples were not. Imagine the flexibility of a newspaper article and compare that with the inflexibility of absolutely positioned paragraphs with fixed heights. Exactly. Apart from that Andy&rsquo;s main inspiration came from comic books. It never hurts to throw in some colorful images.</p>

<p>Like in comic books, usability is not about <em>getting</em> from A to B, it&rsquo;s about the <em>experience</em> of getting from A to B. In comic books the size of a panel and the amount of text strongly influences the reading speed. So you can emphasize content and add dynamics in your web design. That doesn&rsquo;t mean necessarily that everything has to be in boxes. Emphasis can also be added by <em>removing</em> the boxes.</p>

<p><strong>Dan Rubin</strong> used a lot of effects on his designs, like a noise filter to add texture on monochrome surfaces. Nice idea, though that implies the designer explaining the rationale of such a feature to the front-end engineers. They would either ignore it because they overlooked the subtle texture or because they assumed it would be just noise. Some less intrusive hint I will readily adopt was using a letter-spacing of &minus;1 on headlines to prevent tiny rivers between letters. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>

<p>What slightly worries me is that Dan talked about re-using patterns for some effects in Photoshop. Re-using patterns is the same in <acronym title="Cascading Style Sheets">CSS</acronym>, but re-usable effects in Photoshop can mean an <em>un</em>usable amount of work in <acronym>CSS</acronym> and lots of pictures making the website slow. What I miss so far is a common understanding of effects and patterns that are both easy to work with in Photoshop <em>and</em> in frontend programming.</p>

<p><a href="http://www.flickr.com/photos/martin-kliehm/2611269470/in/set-72157605494499216/"><img src="/wp-content/uploads/2008/06/koechley-slide-frontend-knowledge-areas-thumb" width="210" height="158" alt="Slide: Knowledge Areas of Frontend Engineering" class="floatleft" /></a> The next day started with <strong>Nate Koechley&rsquo;s</strong> keynote about <strong><a href="http://nate.koechley.com/blog/2008/06/11/slides-professional-frontend-engineering/">professional frontend engineering</a></strong>. He chose the topic because he thinks this is critical to the advancement of the Internet, and I couldn&rsquo;t agree more. As Frontend Engineers we write <em>software</em> with <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, JavaScript, and quite some amount of <acronym>PHP</acronym>. Douglas Crockford calls this &ldquo;<cite>the most hostile software development environment imaginable</cite>,&rdquo; and if you take a look at this graphic from Nate&rsquo;s slides you will understand why. There are a number of knowledge areas that can be applied in a number of ways on three operating systems and half a dozen browsers in two rendering modes. If you ever wondered why you sometimes see little clouds of smoke coming out of your frontend engineering heads, that&rsquo;s why.</p>

<p>There are four <strong>guiding principles</strong>:</p>

<ol><li>Availability and accessibility for all users worldwide</li>
<li>Openness: share, learn, support, advocate</li>
<li>Richness: provide, but not too much</li>
<li>Stability</li></ol>

<p>Then there are three <strong>core techniques</strong>: <a href="http://developer.yahoo.com/yui/articles/gbs/">Graded Browser Support</a>, <a href="http://domscripting.com/blog/display/41">Progressive Enhancement</a>, and <a href="http://www.onlinetools.org/articles/unobtrusivejavascript/">Unobtrusive JavaScript</a>.If you haven&rsquo;t heard about those concepts, please read about them now.</p>

<p>At that point the presentation turned into giving advice for quite a number of best practices and tips, like using <a href="http://www.jslint.com">JSLint</a>, <a href="http://developer.yahoo.com/yui/yuitest/"><acronym title="Yahoo! User Interface Library">YUI</acronym> Unit Testing</a>, or <a href="http://developer.yahoo.com/yui/profiler/"><acronym>YUI</acronym> Profiler</a> to enhance the quality of your code. Or serving <strong>cacheable assets from cookie-free domains</strong>. Or <strong>anticipated preloads</strong>: sneak in your new JavaScript and <acronym>CSS</acronym> files a week <em>before</em> the relaunch. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" />  Or did you know that the <strong>iPhone</strong> 2G can keep only 19 assets in <strong>cache</strong>, and that it doesn&rsquo;t cache anything larger than 25K? Uncompressed 25K? Needless to say, Nate&rsquo;s presentation was one of the conference highlights.</p>

<p><a href="http://www.flickr.com/photos/martin-kliehm/2560732727/in/set-72157605494499216/"><img src="/wp-content/uploads/2008/06/john-resig" width="210" height="158" alt="John Resig" class="floatleft" /></a> Later I heard a few things about building applications with existing frameworks and <acronym title="Application Programming Interface">API</acronym>s, a timely comparison between <strong>JavaScript libraries</strong> held by no other than <strong><a href="http://jquery.com">jQuery</a>&rsquo;s John Resig</strong>, some tips on <strong>internationalization</strong> by <strong>Richard Ishida</strong>, and a panel about <strong>accessibility</strong>. The one sentence that stuck most in that panel was: &ldquo;Don&rsquo;t be the guy with the problems, be the guy with the solutions.&rdquo; In fact it&rsquo;s very hard to be passionate about your job while being pragmatic and providing solutions instead of just saying &ldquo;no.&rdquo; Something <a href="http://www.ibm.com/developerworks/blogs/page/schwer?entry=cynthia_ice_remembered">Richard Schwerdtfeger</a> wrote about in a different context:</p>

<blockquote cite="http://www.ibm.com/developerworks/blogs/page/schwer?entry=cynthia_ice_remembered"><p>Working in the accessibility field is extremely difficult. It requires very specialized skills&nbsp;&mdash; including incredible persistence. Accessibility is often viewed as additional work that is not always planned for. It requires a person who is tough, committed, patient, and caring to deliver an accessible solution that is usable to our customers. To do this you must have tremendous passion for your job as there is always someone or something to trip you up.</p></blockquote>

<p>Combining passion and diplomacy is a goal many web evangelists still have to work on&hellip; In the meantime remember that accessibility is most likely to have a sustainable impact when it is <a href="http://www.usbln.org/pdf/CRGAccessibilityStudy_v1%206.pdf" type="application/pdf">supported by senior management</a>, when there is an accessibility policy for a company, and when smart companies realize that <a href="/2007/accessibility-cost-effectiveness/">there is money to be made</a> by maximizing the target audience.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2008/atmedia-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Performance Tweaks, Part Two</title>
		<link>http://learningtheworld.eu/2007/performance-2/</link>
		<comments>http://learningtheworld.eu/2007/performance-2/#comments</comments>
		<pubDate>Sun, 24 Jun 2007 14:20:19 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[@media]]></category>
		<category><![CDATA[atmedia]]></category>
		<category><![CDATA[atmedia07]]></category>
		<category><![CDATA[atmedia2007]]></category>
		<category><![CDATA[book:ean=9780596529307]]></category>
		<category><![CDATA[book:isbn=0596529309]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[energy efficiency]]></category>
		<category><![CDATA[etag]]></category>
		<category><![CDATA[expires header]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[http-request]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Nate Koechley]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[steve souders]]></category>
		<category><![CDATA[tenni theurer]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yslow]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2007/performance-2/</guid>
		<description><![CDATA[Nate Koechley presented the research results of the Yahoo! Exceptional Performance Team two weeks ago in London. The traditional focus of <strong>performance optimization</strong> has been on the backend, i.e. system efficiency. But comparing a number of high profile websites, the Yahoo! team found that frontend performance is responsible for 80-98% of the perceived response time. Therefore doubling the frontend performance gains more than doubling the backend performance. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p class="vcard"><a href="http://www.flickr.com/photos/drewm/538822354/in/set-72157600330136671/" title="See larger version on flickr"><img alt="Nate Koechley" src="/wp-content/uploads/2007/07/nate-koechley" width="240" height="160" class="floatleft photo" /></a> <strong><a href="http://nate.koechley.com" class="fn url" rel="co-worker met acquaintance">Nate Koechley</a></strong> presented the <a href="http://nate.koechley.com/blog/2007/06/12/high-performance-web-sites">research results</a> of the Yahoo! Exceptional Performance Team two weeks ago in London (<a href="http://www.htmldog.com/atmedia2007/highperformancewebpages.mp3" type="audio/mp3">podcast</a>). Like Yahoo! shares I would like to share that knowledge with you for those who couldn&rsquo;t attend.</p>

<p>The traditional focus of <strong>performance optimization</strong> has been on the backend, i.e. system efficiency. But comparing a number of high profile websites, the Yahoo! team found that frontend performance is responsible for 80-98% of the perceived response time. Therefore doubling the frontend performance gains more than doubling the backend performance. In case studies <em>Yahoo! Search</em> became 40-50% faster, the <em>Yahoo! Mail</em> web application gained 70-100%. Of course there are ways to increase backend performance without throwing in more hardware, but better frontend performance reduces traffic and saves resources.</p>

<p>Saving resources on the <em>client</em> side, particularly <strong>CPU usage</strong>, also pays off in speed. <a href="http://icant.co.uk/sandbox/eventdelegation/">Event delegation</a> is faster than a large number of event handlers. Likewise we know that <a href="/2007/performance/">reducing the number of HTTP requests</a> through techniques like CSS sprites, sliding doors, or file aggregation increases speed. The reason is the limit of two parallel requests <em>per host</em> imposed by HTTP 1.1. That results in a download queue of two requests at a time, increasing the perceived response time of a page. By configuring additional host aliases for your server you can <a href="http://yuiblog.com/blog/2007/04/11/performance-research-part-4/">increase the number of parallel requests</a>&nbsp;&mdash; but more than 2-4 also increase DNS lookups resulting in higher CPU usage and slower response times.</p>

<p>I wonder when Yahoo! will present us another impressive calculation <strong>how many gigawatts have been preserved</strong> by reducing CPU usage in client PCs and in their <a href="http://www.technewsworld.com/story/55792.html" title="Study: Data Center Power Usage Exploding">data</a> <a href="http://brand.yahoo.com/forgood/environment/energy_conservation.html" title="Yahoo! Energy Conservation Program">centers</a>, as one participant asked in the <acronym title="questions and answers">Q&amp;A</acronym> part. <a href="http://www.ecologee.net">Energy efficient servers</a> are the next big thing, but are there any concrete suggestions for <a href="http://www.addsimplicity.com/adding_simplicity_an_engi/2007/01/compute_power_i.html">greener programming</a>? Is <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> destroying the ozone layer? <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>

<p>Environmental issues aside, here&rsquo;s the <strong><a href="http://developer.yahoo.com/performance/rules.html">list of rules</a></strong>. I&rsquo;ll keep it short where I have written about it in <a href="/2007/performance/">my previous article</a>. See the <a href="http://stevesouders.com/hpws/">examples and testcases</a> by Steve Souders.</p>

<ol>
<li id="rule-1"><strong>Make <a href="/2007/performance/">fewer HTTP requests</a>:</strong> This also affects <a href="http://yuiblog.com/blog/2007/03/01/performance-research-part-3/">cookies</a>. Eliminate unnecessary cookies, keep them small, set them at granular domain levels (e.g. <code>finance.yahoo.com</code> instead of <code>.yahoo.com</code>), and set an appropriate Expires date.</li>
<li id="rule-2"><strong>Use a content distribution network (<acronym>CDN</acronym>)</strong> like <a href="http://www.akamai.com">Akamai</a> where your (static) content is served from distributed data centers located nearer to your client. Even if your website is not as big as Google you can profit from faster response times by using the <a href="http://yuiblog.com/blog/2007/02/22/free-yui-hosting"><acronym title="Yahoo! User Interface">YUI</acronym> library&rsquo;s own <acronym>CDN</acronym></a>.</li>
<li id="rule-3"><strong>Add an Expires header</strong> not just <a href="/2007/performance/#enforce-caching" title="Enforce image caching">for images</a>, but also for JavaScript and stylesheet files.</li>
<li id="rule-4"><strong>Enable gzip:</strong> 90%+ of browsers support compression, and <code>gzip</code> is better supported and compresses more than <code>deflate</code>. Gzip <acronym title="Hypertext Markup Language">HTML</acronym> files, <acronym title="Cascading Stylesheets">CSS</acronym>, scripts, <acronym title="Extensible Markup Language">XML</acronym>, <acronym title="JavaScript Object Literal Notation">JSON</acronym>&nbsp;&mdash; <em>no</em> images or <acronym title="Portable Data Format">PDF</acronym>s.</li>
<li id="rule-5"><strong>Put <acronym>CSS</acronym> at the top</strong>, avoid <code>@import</code> as it loads <em>last</em>, even <em>after</em> the images!</li>
<li id="rule-6"><strong>Move scripts to the bottom</strong> as they block parallel downloads even across hostnames and block rendering of any code below them.</li>
<li id="rule-7"><strong>Avoid <acronym>CSS</acronym> expressions</strong> as they execute many times and cost CPU.</li>
<li id="rule-8">
<p><strong>Use external JavaScript and <acronym>CSS</acronym> files.</strong> <a href="/2007/performance/#inline-css">Inline <acronym>CSS</acronym></a> is apparently faster for a user&rsquo;s start page, but not on subsequent pages. After the page has finished loading, use the time to <strong>preload scripts</strong> to speed up secondary pages.</p>
<ol class="code">
<li><code>window.onload = downloadComponents;</code></li>
<li><code>function downloadComponents() {</code></li>
<li class="indent"><code>var elem = document.createElement(&quot;script&quot;);</code></li>
<li class="indent"><code>elem.src = &quot;http://.../file1.js&quot;;</code></li>
<li class="indent"><code>document.body.appendChild(elem);</code></li>
<li><code>}</code></li>
</ol></li>
<li id="rule-9"><strong>Reduce <acronym title="Domain Name Server">DNS</acronym> lookups</strong> for the reasons stated above. Use 1-4 hosts and the <code>keep alive</code> setting.</li>
<li id="rule-10"><strong><a href="/2007/performance/#file-aggregation">Minify JavaScript</a></strong> with JSMin&nbsp;&mdash; inline scripts, too.</li>
<li id="rule-11"><strong>Avoid redirects</strong> as they are the worst form of blocking. Set Expires headers for redirects to enable caching.</li>
<li id="rule-12"><strong>Remove duplicate files:</strong> this is self-explanatory, but it can happen in large teams with many scripts and stylesheets.</li>
<li id="rule-13"><p><strong>Mind the <acronym title="Entity Tag">ETag</acronym>:</strong> Now this was something I never paid attention to. ETags are unique identifiers to distinguish files that share a <acronym title="Uniform Resource Identifier">URI</acronym>. They are transmitted in the HTTP header. The default server setting uses the <a href="http://en.wikipedia.org/wiki/Inode">INode</a>, the bytesize and the modification date of a file to calculate a unique ID. Unless servers in a cluster are identical, ETags differ, therefore the files are <strong>not cached</strong>. Fortunately <a href="http://httpd.apache.org/docs/2.0/mod/core.html#fileetag">ETags can be configured</a> in Apache, so it should be possible to match them across different servers.</p><ol class="code"><li><code>FileETag MTime Size</code></li></ol>
<p>Note that the ETag is also <strong>relevant for <acronym title="Really Simple Syndication">RSS</acronym> feeds</strong>. For example, currently the <a href="http://www.w3.org/2004/08/TalkFiles/Talks.rss" type="application/rss+xml"><acronym title="World Wide Web Consortium">W3C</acronym> talks feed</a> is more or less unusable: some feed readers and services apparently regard the ETag, the feed is mirrored on many servers, so the same news entry from a different server is shown as new and unread multiple times every day&hellip;</p>
</li>
<li id="rule-14"><strong>Make <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> cacheable and small</strong>. Some data like a user&rsquo;s address book or buddy list change infrequently and should be requested via GET, cached, and set with a <code>Last-modified</code> timestamp and gzipped.</li>
</ol>

<p><img src="/wp-content/uploads/2007/06/book-high-performance-web-sites" alt="Book cover: High Performance Web Sites" width="120" height="158" class="floatleft book" /> These are a lot of rules, and they will be published in a O&rsquo;Reilly book by Steve Souders and Tenni Theurer in September 2007. Anyway, don&rsquo;t be overwhelmed by their mass, instead you can start with the easy things: <strong>&ldquo;<q>harvest the low hanging fruit</q>.&rdquo;</strong> Enable caching with the Expire date setting and reduce the number of HTTP requests. You can deal with the rest later.</p>

<p>Finally Nate Koechley announced a Yahoo! performance tool called <strong><a href="http://developer.yahoo.com/yslow/">YSlow</a></strong> as a plugin for the indespensible <a href="http://www.getfirebug.com">Firebug</a> extension. He also recommended the commercial <a href="http://alphaworks.ibm.com/tech/pagedetailer">IBM Page Detailer</a>, and <a href="http://livehttpheaders.mozdev.org">LiveHTTPHeaders</a> to visualize what&rsquo;s happening in your browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2007/performance-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://www.htmldog.com/atmedia2007/highperformancewebpages.mp3" length="26276424" type="audio/mpeg" />
		</item>
		<item>
		<title>Website Performance Tweaks</title>
		<link>http://learningtheworld.eu/2007/performance/</link>
		<comments>http://learningtheworld.eu/2007/performance/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 20:00:35 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[book:isbn=0596529309]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[concat]]></category>
		<category><![CDATA[css sprites]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Douglas Crockford]]></category>
		<category><![CDATA[Ed Eliot]]></category>
		<category><![CDATA[file aggregation]]></category>
		<category><![CDATA[http-request]]></category>
		<category><![CDATA[JSMin]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[Nate Koechley]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sliding doors]]></category>
		<category><![CDATA[techniques]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2007/performance/</guid>
		<description><![CDATA[In the last six months I became more aware of techniques for optimizing website performance. I learned about memory leaks and JavaScript performance, but what impressed me most was Nate Koechleyâ€™s presentation about large scale website performance issues in â€œYahoo! <abbr title="versus">vs.</abbr> Yahoo!&#8221; at the @media conference 2006. In the meantime there have been more blog posts about particular aspects of performance optimization, so I wrote a summary.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In the last six months I became more aware of techniques for <strong>optimizing website performance</strong>. I learned about <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp" title="Microsoft Developer Network: Understanding and solving Internet Explorer leak patterns">memory</a> <a href="http://outofhanwell.com/ieleak/" title="Drip: A memory leak detector for Internet Explorer">leaks</a> and <a href="http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx" title="IE + JavaScript performance recommendations &ndash; part 1">JavaScript</a> <a href="http://blogs.msdn.com/ie/archive/2006/11/16/ie-javascript-performance-recommendations-part-2-javascript-code-inefficiencies.aspx" title="IE + JavaScript performance recommendations &ndash; part 2">performance</a>, but what impressed me most was <a href="http://nate.koechley.com/blog/2006/07/12/my_atmedia_2006_slides/" rel="met colleague">Nate Koechley&rsquo;s presentation</a> about large scale website performance issues in &ldquo;<a href="http://learningtheworld.eu/2006/atmedia-day-two/#koechley" title="See my notes about his talk">Yahoo! <abbr title="versus">vs.</abbr> Yahoo!</a>&rdquo; at the @media conference 2006. In the meantime there have been more blog posts about particular aspects of performance optimization, and I&rsquo;d like to sum them up:</p>

<p id="file-location"><strong>Parsing JavaScript</strong> freezes the browser. Therefore put <acronym title="Cascading Stylesheets">CSS</acronym> in the <code>head</code> and JavaScript near to the <code>&lt;/body&gt;</code> so that it is parsed when the page has been rendered.</p>

<p id="http-requests">The arch enemy of performance are <strong><a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/" title="YUI Blog: Performance research &ndash; what the 80/20 rule tells us about reducing HTTP requests"><acronym title="Hypertext Transfer Protocol">HTTP</acronym> requests</a></strong>. Many browsers still can&rsquo;t handle more than two or four requests at a time. Keep the number of files down, your website will be faster.</p>

<p>There are several techniques with the aim to reduce the number of files:</p>

<ol><li id="inline-css"><p><strong>&ldquo;<q>A single large file is fastest.</q>&rdquo;</strong> (<cite>Nate Koechley</cite>) That&rsquo;s why Yahoo! <em>apparently</em> has such an amount of <a href="http://www.robertnyman.com/2007/01/24/with-these-web-sites-would-you-say-the-web-standards-war-is-won/">inline <acronym title="Cascading Stylesheets">CSS</acronym></a>. They found out <a href="http://yuiblog.com/blog/2007/01/04/performance-research-part-2/" title="YUI Blog: Performance research, part 2: browser cache usage &ndash; exposed!">browser caching</a> is not as effective as they thought, in particular not on a user&rsquo;s start page. So they deliver &ldquo;inline&rdquo; <acronym>CSS</acronym>. Actually writing inline <acronym>CSS</acronym> is a maintenance nightmare, but delivering <acronym>CSS</acronym> content inline doesn&rsquo;t mean the files can&rsquo;t have separate lives on the server: concatenate the files with a server side technique of your choice.</p>
<p><strong>Update:</strong> A couple of months later <a href="/2007/performance-2/#rule-8">Nate explained that further</a>: when your page is likely to be a user&rsquo;s start page, caching plays a minor role, thus &ldquo;inline&rdquo; <acronym>CSS</acronym> is faster. Otherwise use external files, aggregate them, and make sure they are cached (see below).</p></li>
<li id="enforce-caching"><p><strong>Enforce caching.</strong> Another <a href="http://www.bazon.net/mishoo/articles.epl?art_id=958"><acronym title="Internet Explorer">IE</acronym> bug</a> prevents image caching. Add the following to your <code>.htaccess</code>, <code>httpd.conf</code> or <code>vhost.conf</code> settings:</p>
<ol class="code">
<li><code>&lt;IfModule mod_expires.c&gt;</code></li>
<li class="indent"><code>ExpiresActive On</code></li>
<li class="indent"><code>ExpiresByType image/jpg &quot;access plus 1 day&quot;</code></li>
<li class="indent"><code>ExpiresByType image/jpeg &quot;access plus 1 day&quot;</code></li>
<li class="indent"><code>ExpiresByType image/gif &quot;access plus 1 day&quot;</code></li>
<li class="indent"><code>ExpiresByType image/png &quot;access plus 1 day&quot;</code></li>
<li><code>&lt;/IfModule&gt;</code></li></ol></li>
<li id="background-images"><p><strong>Reduce the number of background images</strong> with techniques like <a href="http://www.alistapart.com/articles/sprites/">CSS Sprites</a> or <a href="http://www.alistapart.com/articles/slidingdoors/">Sliding Doors</a>. Instead of four images of rounded corners you <a href="http://www.fiftyfoureleven.com/sandbox/sliding-doors-one-image/" title="Example">only need one</a> and get the mouseover state for free! The green download button on <a href="http://www.mozilla.com">mozilla.com</a> is based on that technique. And <a href="http://www.yahoo.com">Yahoo!</a> uses <acronym>CSS</acronym> Sprites to combine a huge number of icons.</p>

<p><img src="/wp-content/uploads/2007/01/mozilla-button.jpg" class="centered screenshot" width="300" height="149" alt="Download button on mozilla.com using the Sliding Doors technique" /></p>

<p>Please note this approach is only for <em>decorational background images</em> that degrade gracefully. <del>It&rsquo;s not for <code>img</code> elements.</del> <ins>Be careful when you use it for <a href="/2007/foreground-sprites/">foreground images</a>.</ins> And if text comes as a graphical representation, it can become inaccessible for screen reader users, zoom readers, or people with stylesheets switched off. Use real text instead.</p>

<p>Also note changing the <code>background-position</code> causes <acronym>IE6</acronym> to flicker, related to the caching bug above. To avoid it, simply add the following:</p>
<ol class="code">
<li><code>&lt;script type=&quot;text/javascript&quot;&gt;</code></li>
<li class="indent"><code>try { document.execCommand(<span class="codeSpace">&nbsp;</span>&quot;BackgroundImageCache&quot;, false, true); } catch(e) {};</code></li>
<li><code>&lt;/script&gt;</code></li></ol></li>
<li id="file-aggregation"><p><strong>Aggregate files.</strong> Ed Eliot wrote a nice <a href="http://www.ejeliot.com/blog/72" title="Automatic merging and versioning of CSS/JS files with PHP">script to merge JavaScript or <acronym>CSS</acronym> files</a>, bonus respect for the advanced versioning and caching features.</p>

<p>But remember the cases when it doesn&rsquo;t make sense to merge <acronym>CSS</acronym> files: your <acronym title="Internet Explorer">IE</acronym> bugfixes still belong in conditional comments. If you use the <code>@import</code> rule to filter antique browsers from getting advanced styles, you can&rsquo;t drop it. And if you want to merge stylesheets for different media (<abbr title="for example">e.g.</abbr> print), make sure the code is enclosed in something like</p>


<ol class="code">
<li><code>@media print {</code></li>
<li class="indent"><code>/* style sheet for print goes here */</code></li>
<li><code>}</code></li></ol>


<p>In an <a href="http://www.ejeliot.com/blog/73" title="Adding JSMin to the CSS/JS merging script">updated version</a> Ed added <a href="http://javascript.crockford.com/jsmin.html">JSMin</a> to strip comments and excess whitespace. JSMin works like a charm for JavaScript files. But it cuts a few space characters too much so that the syntax of <acronym>CSS</acronym> selectors changes <del>therefore for now I have abandoned the idea to compress them too</del>. <ins>See <a href="#comment-6045">Jens Meiert&rsquo;s comment</a> below for a recommendation to minimize <acronym>CSS</acronym>.</ins></p>

<p>His original code requires the C version of JSMin with PHP <code>safe_mode</code> turned off. If you prefer a pure PHP version, get the <a href="http://javascript.crockford.com/jsmin2.php.txt">PHP version of JSMin</a> and my <a href="/examples/combine-jsmin.phps" type="text/plain">adapted version of the script</a>.</p>
</li></ol>

<p>I&rsquo;m still in awe how fast one of my own websites became! Thanks to the guys at Yahoo! for the inspiration and for most of the research this article is based upon. Even JSMin was written by an employee of Yahoo! Speaking about Yahoo! employees: <a href="http://wait-till-i.com/" title="Christian Heilmann" rel="met colleague">Chris</a>, I hope there are still enough topics for your <a href="http://www.thinkvitamin.com/features/dev/enhance-your-page-performance" title="Chris Heilmann: Enhance your (page) performance!">Vitamin article</a>. I wanted to write about performance anyway, and to my surprise I <a href="http://www.robertnyman.com/2007/01/24/with-these-web-sites-would-you-say-the-web-standards-war-is-won/#comment-29959">read yesterday</a> that you have similar plans. See ya in <a href="/2007/brain-food/#e-accessibility" title="First European e-Accessibility Forum">Paris</a>. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2007/performance/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>
