<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Speed Tweak of the Week</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/" />
    <link rel="self" type="application/atom+xml" href="http://www.websiteoptimization.com/speed/tweak/atom.xml" />
   <id>tag:www.websiteoptimization.com,2008:/speed/tweak//3</id>
    <link rel="service.post" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3" title="Speed Tweak of the Week" />
    <updated>2008-05-06T12:29:36Z</updated>
    <subtitle>Learn speed techniques you can use to increase page download speed. Speed Tweak of the Week shows how to optimize XHTML, CSS, JavaScript, graphics, and other web page components to maximize web site speed and usability.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.1</generator>
 

<entry>
    <title>Average Web Page Size Triples Since 2003</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/average-web-page/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=186" title="Average Web Page Size Triples Since 2003" />
    <id>tag:www.websiteoptimization.com,2008:/speed/tweak//3.186</id>
    
    <published>2008-04-28T11:42:17Z</published>
    <updated>2008-05-06T12:29:36Z</updated>
    
    <summary>Within the last five years, the size of the average web page has more than tripled, and the number of external objects has nearly doubled. While broadband users have experienced somewhat faster response times, dial-up users have been left behind.
</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        <![CDATA[The size of the average web page has more than tripled since 2003. From 2003 to 2008 the average web page grew from 93.7K to over 312K (see Figure 1), some 233% (Domenech et al. 2007, Flinn &amp; Betcher 2008). During the same five-year period, the number of objects in the average web page nearly doubled from 25.7 to 49.9 objects per page. Longer term statistics show that since 1995 the size of the average web page has increased by 22 times, and the number of objects per page has grown by 21.7 times. ]]>
        <![CDATA[
<div align="center">
<p><a href="growth-average-web-page.png"><img src="growth-average-web-page-sm.png" border="1" width="409" height="326" alt="growth of average web page"></a></p>
<h4>Figure 1: Growth of the Average Web Page</h4>
</p></div>

<style type="text/css">
<!--
#side4{float:right;width:350px;margin:0 0 0 2em;padding:1em;border-left:1px solid #c0afcf;border-bottom:1px solid #c0afcf;background:#dcdcdc;color:#000;}
#side4 h2,#side4 h3, #side4 h4, #side h5{margin-top:0;padding-top:0em;text-align:center;}
-->
</style>
<div id="side4">
<h3>Anatomy of a Web Page</h3> 
<p>A web page is made up of a container object (CO) and external objects (EOs). The CO is usually an XHTML file that references EOs such as images, audio, video, and external CSS and JavaScript files. Most non-textual EOs are usually pre-compressed, so you'll only see the benefits of <a href="../compress/">HTTP compression</a> on XHTML and on some CSS and JavaScript files. For more than 60% of web pages, the CO occupies less than 50% of total page size.  The average CO takes up about 44% of total page size (Yuan, Li, &amp; Chi 2005).</p>

<p>Therefore, no matter how efficient your XHTML optimization and HTTP compression, the greatest improvement in web page performance that you can expect from XHTML optimization will be less than 50%. For a 300K home page, on average, you'll still need to download at least 150K of EOs, even after optimizing and compressing your textual data. You can see why it is important to optimize your entire web page, including multimedia, in order to make significant performance gains.</p>
</div>

<h2>Growth of the Top 1000 Web Pages in 2007</h2>

<p>Over the past calendar year, the thousand most popular home pages grew by 24.2% from December 2006 to December 2007, that is, from 250K to 310.4K (see Figure 2). At this growth rate the average home page will exceed 385K by the end of 2008.</p>

<div align="center" style="text-align:center;margin:0 auto;">
<p><a href="top-1000-web-page2007.png"><img src="top-1000-web-page2007sm.png" border="1" width="408" height="326" alt="growth of average top 1000 home page 2007"></a></p>
<h4>Figure 2: Growth of the Average Top 1000 Home Page</h4>
</p></div>

<p>The number of objects grew by 14.5% in 2007 from 44.2 in December 2006 to 50.6 objects per page in December 2007. An October 2007 survey of the top 50 retailers revealed that the average number of objects per page was 60.5 (Flinn &amp; Betcher 2007). With the average number of objects per page above 50, the latency due to <a href="../parallel/">object overhead</a> now <em>dominates most web page delays</em>.</p>


<h2>Response Time Trends - The Bandwidth Divide</h2>

<p>From 2003 to 2008 web page size has more than tripled and the number of external objects has nearly doubled. So narrowband users (56K and ISDN) have experienced slower response times over time. Conversely, broadband users have experienced somewhat faster response times over time. For broadband users the average download time of the Keynote Business 40 Internet Performance Index (KB40) has decreased from 2.8 to 2.33 seconds from Feb. 2006 to Feb. 2008 (see Figure 3 and Berkowitz &amp; Gonzalez 2008).</p>

<div align="center"><p><a href="response-time-KB40-2y.png"><img src="response-time-KB40-2ysm.png" border="1" width="550" height="352" alt="average kb40 web site performance over broadband from feb. 2006 to feb. 2008"></a></p>
<h4>Figure 3: Average KB40 Web Site Performance over Broadband from Feb. 2006 to Feb. 2008 (Source: Keynote Systems, Inc.)</h4>
</p></div>

<p>So the increase in the average speed of broadband has more than kept pace with the increase in the size and complexity of the average web page. That is one reason why broadband users expect faster response times. Yet narrowband users have experienced slower response times as web page size has increased. </p>

<h2>Average Web Page Characteristics</h2>

<p>In a 2006 survey of over 21,500 non-framed web pages, Ryan Levering and Michal Cutler found that the average web page contained 474 words, 281 HTML tags, and 41 links, 10 of which pointed outside the domain (Levering &amp; Cutler 2006). They found that the average web page was 1440 pixels in height, about twice the size of the screen height. When the average web page is opened, more of what the user sees is graphics, not text. Graphics make up most of the objects in the average web page. Graphics cause most of the delays that users experience from object overhead.</p>

<h3>Change in the Average Web Page over Time</h3>

<p>A subsequent survey in 2007 run for the author revealed changes in the composition of the average web page. Despite the widespread adoption of CSS, the 2007 survey found that 62.6% of web pages still use tables for layout and 32.8% use the font tag for inline style (Levering 2007). In an encouraging trend, the average table depth decreased by half from the 2006 survey, from 2.95 to 1.47. Complex <a href="../layer/">nested tables</a> can cause rendering delays with browsers because tangled tables must be parsed and rendered before your content displays. Between the 2006 and 2007 surveys, the average number of HTML elements per web page more than doubled from 281 to 592.6 elements per page.</p>

<h4>Use of JavaScript in the Average Web Page</h4>
<p>In the 2007 survey, 84.8% of web pages used the script element. The average size of external scripts was 8,845 bytes uncompressed, and 6,302 bytes compressed. Total script size was 68,812 bytes uncompressed and 49,738 bytes compressed. The average number of external scripts was 7, where 6 of which were unique.</p>

<h4>Use of CSS in the Average Web Page</h4>
<p>In the 2007 survey, 82.4% used the link tag, and 54.5% used the style tag (with an average of 2.27 style tags used internally). The average size of external style sheets was 6,575 bytes, and 4,457 bytes compressed. The total average style size was 15,175 bytes uncompressed, and 10,347 bytes compressed.</p>

<h4>Use of Images in the Average Web Page</h4>
<p>Images were used in 91.6% of web pages in the 2007 survey. GIFs were used in 84.6% of web pages, up from 77.9% in 2006 (see Table 1). JPEGs were used in 64.5% of web pages, up from 55.8% in 2006. PNGs were used in 32.2% of web pages, up significantly from 7.2% in 2006. BMPs were used by 0.8% of web pages in 2006. BMPs in particular can be quite large as they are usually not compressed. They should be avoided for Web use. </p>
<style type="text/css">
<!--
.data tr.right th{text-align:right;}
.data tr th.left{text-align:left;}
.data td{text-align:left;}
-->
</style>
<div align="center">
<TABLE border="1" class="t data" align="center">
<colspan>
<col align="left">
 <col align="left">
 <col align="left">
</colspan>

<tr class="light">
<th>Image Encoding</th><th>Frequency 2006</th><th>Frequency 2007</th></tr>
<tr><td>GIF</td><td>77.9%</td><td>84.6%</td></tr>
<tr><td>JPEG</td><td>55.8%</td><td>64.5%</td></tr>
<tr><td>PNG</td><td>7.2%</td><td>32.2%</td></tr>
<tr><td>BMP</td><td>0.8%</td><td>-</td></tr>
</table>
<h4>Table 1: Image Usage in the Average Web Page (2006 and 2007 surveys)</h4></div>

<p>If the images in the average page were grouped together, the image area would be 49,144 pixels, or an image of 221 by 221 pixels in dimension (see Figure 4).</p>

<div align="center"><p><img src="average-total-graphics.png" border="0" width="221" height="221" alt="average aggregated graphic area in average web page"></a></p>
<h4>Figure 4: Average Aggregated Graphic Area in the Average Web Page</h4>
</p></div>

<p>A large-scale study confirmed these findings with over 75% of HTTP requests resulting from images (Gonzalez-Canete, Casilari, &amp; Trivino-Cabrera 2007).</p>


<h2>The Growth of Multimedia on the Web</h2>

<p>The use of streaming media on the Web has increased by more than 100% each year (Li et al. 2005). From 2000 to 2005 the total volume of streaming media files stored on the Web grew by more than 600%. More than 87% of all streaming media is abandoned by users in the first 10 seconds, however, wasting up to 20% of server bandwidth (Guo et al. 2005). While only 3% of server responses are for videos, they account for over 98.6% of the bytes transferred (Gill et al. 2007). In true Pareto fashion, about 10% of the most popular videos on YouTube account for nearly 80% of the views, making <a href="../cache/">caching</a> an appealing performance enhancement (Cha et al. 2007).</p>

<p>Overall, for videos longer than 30 seconds, about 13% of home and 40% of business users experience quality degradation with their streaming media, caused by re-buffering, stream switching, and video cancellation. For sessions longer than 300 seconds, the results are even worse. As broadband penetration has increased, videos have grown in size, bit rate, and duration (see Figure 5).</p>

<div align="center"><p><img src="web-video-duration.png" border="0" width="470" height="338" alt="growth in web video duration over time"></p>
<h4>Figure 5: Growth in Duration of Web Videos</h4>
</p></div>

<p>In 1997, 90% of videos were under 45 seconds in length (Acharya &amp; Smith 1998). In 2005, the median video was about 120 seconds long (Li et al. 2005). By 2007, the median video was 192.6 seconds in duration (Gill et al. 2007). The median bit rate of web videos grew from 200Kbps in 2005 to 328Kbps on YouTube in 2007. So by late 2007, the median video weighed in at over 63MB in file size. On YouTube, the average video size is 10MB, with over 65,000 new videos added every day. </p>

<h3>Why the increase in the Average Web Page?</h3>

<p>The purpose of this article is to show trends in the size and composition of the average web page. Some readers have asked why this is happening. Web 2.0 technologies such as Ajax certainly contribute to the increase in the number of objects per page, as well as the growth in JavaScript file size. Dynamically generated sites from content management systems are typically not as optimized as hand-tuned sites, and often carry over site-wide CSS, JavaScript, and page components to every page on a site.</p>

<p>As <a href="/bw/">broadband becomes more widespread</a> web designers have created more elaborate designs, assuming that a large proportion of their audience is on broadband, or ignoring dial-up users entirely. At the time of this writing, however, <a href="/bw/0804/">43% of US households are still on dial-up</a>, according to our latest bandwidth report. Some solutions are as follows:</p>
<ul>
<li>Use progressive enhancement to deliver a universal HTML page with an enhanced overlay for more capable browsers</li>
<li>Offer high and low bandwidth alternatives (we prefer the first solution)</li>
<li>Design your site for the lowest common denominator</li>
</ul>

<h2>Conclusion</h2>

<p>Within the last five years, the size of the average web page has more than tripled, and the number of external objects has nearly doubled. While broadband users have experienced faster load times, dial-up users have been left behind. With the average web page sporting more than 50 external objects, object overhead now dominates most web page delays. <a href="../http/">Minimizing HTTP requests</a> by using <a href="../css-sprites/">CSS sprites</a>, <a href="../suture/">combining JavaScript or CSS files</a>, reducing the number of EOs, and converting graphic effects to CSS while still retaining attractiveness, has become the most important skill set for web performance optimizers.</p>

<h2>Further Reading</h2>
<dl>
<dt>Acharya, S., and B. Smith, "An Experiment to Characterize Videos Stored On the Web,"</dt>
<dd>in <i>MMCN</i> 1998 (San Jose, CA: Jan. 1998), 166-178.</dd>

<dt>Berkowitz, D., and A. Gonzalez, "Andy:  Keynote data for your use,"</dt>
<dd>e-mail to author (Feb. 8, 2008). Keynote Systems, Inc. provided the graph of the KB40 response time from Feb. 2006 to Feb. 2008. The average web page load time for the KB40 decreased from 2.8 to 2.33 seconds from Feb. 2006 to Feb. 2008.</dd>

<dt>Cha, M., Kwak, H., Rodriguez, P., Ahn, Y.-Y., and S. Moon, "I Tube, You Tube, Everybody Tubes: Analyzing the World's Largest User Generated Content Video System,"</dt>
<dd>in <i>IMC 2007</i> (San Diego, CA: October 24-26, 2007), 1-13. YouTube is estimated to carry over 60% of videos online, serving 100 million videos daily. Simple caching of the most popular videos offloaded server traffic by as much as 50%.</dd>

<dt>Domenech, J., Pont, A., Sahuquillo, J., and J. Gil, "A user-focused evaluation of web prefetching algorithms,"</dt>
<dd><i>Computer Communications</i> 30, no. 10 (2007): 2213-2224. In 1995 there were 2.3 average objects per page and 25.7 in 2003 (average of two traces).</dd>
<dt>Flinn, D., and B. Betcher of Gomez.com, "Re: latest top 1000 website data?"</dt>
<dd>e-mail to author, Jan. 8, 2008. As of January 2008, the average top 1000 home page was 312K in total file size, referencing 49.92 total objects.</dd>
<dt>Flinn, D., and B. Betcher, "Re: mockup of section in book about slower pages vs higher,"</dt>
<dd>e-mail to author, Nov. 16, 2007. Gomez surveyed for the author the top 50 retailers for response times, consistency, and composition.</dd>
<dt>Gill, P., Arlitt, M., Li., Z., and A. Mahanti, "YouTube Traffic Characterization: A View From the Edge,"</dt>
<dd>in <i>IMC 2007</i> (San Diego, California: October 24-26, 2007), 20. About 24% of videos are interrupted because of poor performance or poor content quality.</dd>
<dt>Gonzalez-Canete, F., Casilari, E., and A. Trivino-Cabrera, "Characterizing Document Types to Evaluate Web Cache Replacement Policies,"</dt>
<dd>in <i>ECUMN 2007</i> (Toulouse, France: Feb. 14-16, 2007), 3-11.</dd>
<dt>Guo, L., Chen, S., Xiao, Z., and X. Zhang, "Analysis of Multimedia Workloads with Implications for Internet Streaming,"</dt>
<dd>in <i>WWW 2005</i> (Chiba, Japan: May 10-14, 2005), 519-528.</dd>
<dt>King, A., "<a href="../css-sprites/">CSS Sprites: How Yahoo.com and AOL.com Improve Web Performance</a>,"</dt>
<dd>Learn how AOL and Yahoo! use CSS sprites to improve performance for their busy home pages. CSS sprites save HTTP requests by using CSS positioning to selectively display composite background images. To maximize accessibility and usability, CSS sprites are best used for icons or decorative effects. Website Optimization, Sep. 26, 2007.</dd>
<dt>King, A., "<a href="../compress/">HTTP Compression</a>,"</dt>
<dd>HTTP compression uses standards-based gzip and deflate compression algorithms to compress your XHTML, CSS, and JavaScript to speed up web page downloads and save bandwidth. Website Optimization, Dec. 4, 2003.</dd>
<dt>King, A., "<a href="../http/">Minimize HTTP Requests</a>,"</dt>
<dd>By combining external files and embedding CSS and JavaScript within your HTML you can minimize the number of HTTP requests required to render your page. Each unique HTTP request requires a round trip to a server, introducing indeterminate delays. Website Optimization, Dec. 17, 2003.</dd>
<dt>King, A., "<a href="../parallel/">Optimize Parallel Downloads to Minimize Object Overhead</a>,"</dt>
<dd>With the average web page growing past 50 external objects, object overhead now dominates most web page delays. Increasing parallel downloads by using multiple hostnames can realize up to a 40% improvement in web page latency. Website Optimization, Dec. 26, 2007.</dd>
<dt>King, A., "<a href="../suture/">Suture CSS or JavaScript Files to Reduce HTTP Requests</a>,"</dt>
<dd>Learn how to "suture" CSS or JavaScript files together before delivery from the server to save HTTP requests. You'll have your organization and eat it too with this server-side approach to merging files. Website Optimization, Oct. 31, 2007.</dd>
<dt>King, A., "<a href="http://www.optimizationweek.com/reviews/average-web-page/">The Average Web Page - Preliminary Results</a>,"</dt>
<dd>Preliminary results from a 2006 web page survey run for the author by Ryan Levering. OptimizationWeek.com, Oct. 26, 2006.</dd>
<dt>King, A., "<a href="../cache/">Use Server Cache Control to Improve Performance</a>,"</dt>
<dd>Configure your Apache server for more efficient caching to save bandwidth and improve web site performance. A web cache reduces latency and improves web site response times. Website Optimization, Oct. 23, 2004.</dd>
<dt>Levering, R., "RE: revised web page survey,"</dt>
<dd>e-mail to author (July 27, 2007). In a random survey of 500 pages indexed by Google for the author, 62.6% of pages used the TABLE tag while 85.1% used the DIV tag. Tables nested to an average maximum depth of 1.47, with an average number of 12.57 table tags per page. The average maximum HTML depth was 15.35, demonstrating how DIVs are replacing table nesting.</dd>
<dt>Levering, R., and M. Cutler, "The Portrait of a Common HTML Web Page,"</dt>
<dd>in <i>DocEng 2006</i> (Amsterdam, The Netherlands: October 10-13, 2006), 198-204. Found that the average web page contained 474 words, 281 HTML tags, and 41 links, 10 of which pointed outside the domain. Also found that the average web page was 1440 pixels in height. Table nesting depth was 2.95. </dd> 
<dt>Li, M., Claypool, M., Kinicki, R., and J. Nichols, "Characteristics of Streaming Media Stored on the Web,"</dt>
<dd><i>ACM Transactions on Internet Technology</i> 5, no. 4 (2005): 601-626.</dd>
<dt>Yuan, J.-L., Li, X., and C.-H. Chi, "Understanding the Impact of Compression on Web Retrieval Performance,"</dt>
<dd>in <i>AusWeb05</i> (Royal Pines Resort, Australia: July 2-6, 2005), http://ausweb.scu.edu.au/aw05/papers/refereed/yuan/paper.html (Feb. 10, 2008).</dd>

</dl>]]>
    </content>
</entry>

<entry>
    <title>Inline Images with Data URLs</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/inline-images/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=158" title="Inline Images with Data URLs" />
    <id>tag:www.websiteoptimization.com,2008:/speed/tweak//3.158</id>
    
    <published>2008-02-28T09:05:38Z</published>
    <updated>2008-02-28T09:08:42Z</updated>
    
    <summary>Learn how to embed images into your web pages with data URLs. The data: URI scheme includes images directly into your XHTML pages using code instead of external files, saving valuable HTTP requests.</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="CSS optimization" />
    
        <category term="Graphic optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
        <category term="XHTML optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        Inline images use the data URI scheme to embed images directly within web pages. As defined by RFC 2397, data URIs are designed to embed small data items as &quot;immediate&quot; data, as if they were referenced externally. Using inline images saves HTTP requests over externally referenced objects. 
        <![CDATA[<h2>Browser Support for Data URLs</h2>

<p>While Opera 7.2+, Firefox, Safari, Netscape, and Mozilla support data URIs, Internet Explorer 5-7 do not. However, Internet Explorer 8 reportedly does, by <a href="http://www.webstandards.org/2007/12/19/ie8-passes-acid2-test-2/">passing the Acid2 test</a>, making data URLs a viable alternative for embedding smaller decorative images. There are workarounds that you can use for older versions of Internet Explorer. </p>

<h2>The Data URL Scheme</h2>

<p>You’ve no doubt seen other URL schemes in your travels around the Web, such as http:, ftp:, and mailto: schemes. The data: URL scheme is a way to embed "immediate data" as if it was included externally. Data URLs use the following syntax:</p>

<pre><code>data:[&lt;mediatype&gt;][;base64],&lt;data&gt;</code></pre>

<p>In the case of an image, you'd use a mime type identifying the image (image/gif, for example) followed by a base64 representation of the binary image. Here is an example (note returns included to avoid horizontal scrolling):</p>

<pre><code>&lt;img src="data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub/
/ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcpp
V0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7" 
width="16" height="14" alt="embedded folder icon"&gt;</code></pre>

<p>The resulting image is a folder icon (cropped screenshot):</p>

<p><img src="folder.png" width="34" height="27" alt="folder icon"></p>

<h3>CSS and Inline Images</h3>

<p>Embedded in XHTML files, data URL images are not cached for repeated use, nor are they cached from page to page. One technique to enable caching is to embed background images in external CSS files. CSS is cached by browsers and these images can be reused with a selector, for example:</p>

<pre><code>ul {list-style:none;}
ul &gt; li {
	margin:0 0 .1em;
	background:url(data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub/
/ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExK
cppV0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7) 
top left no-repeat; )
	height:14px;
	text-indent:1.5em;
}
&lt;/style&gt;</code></pre>

<p>Now the folder image is repeated for each instance of the LI (or you could use a class or ID here as well).</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;Testing inline images, one&lt;/li&gt;
&lt;li&gt;Two&lt;/li&gt;
&lt;li&gt;Three&lt;/li&gt;
&lt;/ul&gt;</code></pre>

<p>Which looks like this in Firefox (cropped screenshot):</p>

<p><img src="folder-css.png" width="198" height="70" alt="folder icons in list using css"></p>

<h3>Data URL Issues</h3>

<p>There are two issues with this approach. You must recalculate the base64 data and edit the CSS file every time the image changes. Also, IE versions 5-7 do not support inline images. The first problem has a simple PHP solution thus:</p>

<pre><code>&lt;?php echo base64_encode(file_get_contents("../images/folder16.gif")) ?&gt;</code></pre>

<p>This code reads the image and converts it to base64 automatically at the server. You pay for this editing convenience with some server-side processing.</p>

<h3>Internet Explorer Workarounds</h3>

<p>There are two ways around IE's lack of data URL support. Using browser sniffing you can simply show the external image for IE and the embedded images for other browsers. Or you can use JavaScript to simulate data URL support in IE, but this method requires a fair amount of JavaScript code. The PHP code above makes insertion of the base64 equivalent of an image easy:</p>

<pre><code>ul {list-style:none;}
ul &gt; li {
	margin:0 0 .1em;
	background: url(data:image/gif;base64,&lt;?php echo base64_encode(file_get_contents("../images/folder16.gif")) ?&gt;) top left no-repeat;
	height:14px;
	text-indent:1.5em;
}
&lt;/style&gt;</code></pre>

<p>Now when your server parses the CSS file, it will automatically encode the binary image file into base64 and send the encoded inline image data directly within the CSS file. Next you need to add browser sniffing to deliver the image for IE and the inline image for all others. You could do this within the CSS file with PHP or with conditional comments like this:</p>

<pre><code>&lt;!–[if gte IE 5]&gt;
&lt;style type="text/css" url="ie.css"&gt;
&lt;![endif]--&gt;

&lt;!--[if !(IE)]&gt;
&lt;style type="text/css" url="notie.css"&gt;
&lt;![endif]--&gt;</code></pre>

<p>where the ie.css file would have a normal image reference thus:</p>

<pre><code>ul &gt; li {
	margin:0 0 .1em;
	background: url(/images/folder16.gif) top left no-repeat;</code></pre>
...</code></pre>



<h3>Advantages of Data URLs</h3>

<p>Data URLs save HTTP requests. When combined with <a href="../css-sprites/">CSS sprites</a>, data URLs can save numerous HTTP requests. It would be interesting to see if data URLs can be combined with USEMAPS or make a data URL CSS sprite.</p>

<ul>
<li>Save HTTP requests, avoids adding to object overhead</li>
<li>Save concurrent thread - browsers default to two simultaneous connections per hostname</li>
<li>HTTPS requests are simplified and performance improved</li>
</ul>

<h3>Disadvantages of Data URLs</h3>

<p>Inline images are not supported in Internet Explorer 5-7, although version 8 reportedly supports them. The base64 textual representation of image data also takes up more bytes than the binary image. In our tests the base64 data was 39 to 45% larger than the binary image, but with gzip compression the difference was reduced to only 8 to 9% larger. Optimizing your images before converting to base64 reduced the size of the string proportionally.</p>

<p>There are size limitations for inline images. Browsers are only required to support URLs up to 1,024 bytes in length, according to the above RFC. Browsers are more liberal in what they'll accept, however. Opera limits data URLs to about 4,100 characters. Firefox supports data URLs up to 100K, so this technique is best used for small, decorative images. In summary:</p>

<ul>
<li>IE 5-7 does not support</li>
<li>More steps to update embedded content (reencode, reembed)</li>
<li>Length limits - technique is useful for smaller, decorative images</li>
<li>Base64 encoded images are roughly 33% larger than their binary equivalent</li>
</ul>

<h2>Example Data URLs</h2>

<p>Below you'll find some live examples to test on your browser, mirroring the code above.</p>

<ul>
<li><a href="folder-test.html">Folder Icons Embedded in HTML</li>
<li><a href="folder-testcss.html">Folder Icons using CSS</a></li>
</ul>

<h2>Conclusion</h2>

<p>With the release of Internet Explorer 8, data URIs will become a viable option. You can embed small images directly within web pages with data URLs to save HTTP requests. Data URLs are a convenient way to create self-enclosed web pages that don't rely on external objects to render.</p>

<h2>Further Reading</h2>

<dl>
<dt><a href="../css-sprites/">CSS Sprites: How Yahoo.com and AOL.com Improve Web Performance</a></dt>
<dd>Learn how AOL and Yahoo! use CSS sprites to improve performance for their busy home pages. CSS sprites save HTTP requests by using CSS positioning to selectively display composite background images. To maximize accessibility and usability, CSS sprites are best used for icons or decorative effects.
</dd>
<dt><a href="http://en.wikipedia.org/wiki/Data:_URI_scheme">data: URI scheme</a></dt><dd>Wikipedia page on data URLs</dd>
<dt><a href="http://software.hixie.ch/utilities/cgi/data/data">Data URL kitchen</a></dt><dd>Converts images to data URLs</dd>
<dt><a href="http://www.sveinbjorn.org/dataurlmaker">Data URL Maker</a></dt><dd>Also converts images to data URLs</dd>
<dt><a href="http://tools.ietf.org/html/rfc2397">RFC 2397</a></dt><dd>The "data" URL scheme specification from the IETF.</dd>
</dl>

]]>
    </content>
</entry>

<entry>
    <title>The Cost of Banner Advertising on Web Performance</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/advertising/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=156" title="The Cost of Banner Advertising on Web Performance" />
    <id>tag:www.websiteoptimization.com,2008:/speed/tweak//3.156</id>
    
    <published>2008-02-01T02:35:55Z</published>
    <updated>2008-02-01T02:51:35Z</updated>
    
    <summary>The cost of banner ads for the average website is about one-sixth more objects and one-third more latency. Learn how online advertising affects web page response times, user behavior, and satisfaction.</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Graphic optimization" />
    
        <category term="Multimedia optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        Advertising is a multi-billion dollar industry on the Web. The Internet Advertising Bureau reported that web advertising grew by nearly 34 percent in 2006 over 2005, totaling about $16.8 billion (IAB 2007). The yearly growth rate of Internet ads is increasing at 28.6% per year, while the overall ad industry drags along with an increase of only 7.7% a year (Baker 2004).  
        <![CDATA[<p>To capture the limited attention spans of visitors, advertisers have increased the size of their ads. Larger ads, on the order of 360x240 pixels, have been shown to have significantly higher clickthrough rates than do the smaller ads of 468x60 pixels (Robinson, Wysocka, and Hand 2007). Advertisers have resorted to pop-up and pop-under ads to deliver their message, but these have been shown to annoy users and reduce their intention to return (McCoy et al. 2007). The number of ads for the average web page has also increased over time with the average popular page containing over 8 ads. Sponsored advertising has increased, with more than twice the share of ads for paid search as opposed to banner ads, according to projections (Laffey 2007). Off-search PPC ads appear as graphic text ads, adding to the profusion of banner ads. All of these trends mean an increase in the file size and in the number of banner ads for the average web page. This article examines the effect of banner ads on web performance. What price do we pay for banner ads on the Web?</p>

<h2>The Effect of Banner Advertising on Web Performance</h2>

<p>Popular sites that use advertising to generate revenue do so at a cost of about one-sixth more objects and one-third more latency (Krishnamurthy and Wills 2006). The growth in the number and size of advertisements has caused significant delays for users. In an analysis of the top 100 Alexa sites in 13 categories, Balachander Krishnamurthy and Craig Wills have found that 56% of the pages contained ads or some form of “extraneous content.” 
Ads accounted for about one-sixth of the objects and bytes in the average web page that has at least one advertisement. The average web page with ads was 295K in size with 48K due to advertising. It contained 52 objects, 8.1 of which were ads, served from 5.7 and 3.2 servers, respectively. Another study of the effects of online advertising found that users not subjected to ads were 11% more likely to return or to recommend the site (McCoy et al. 2007). Subjects exposed to inline ads (i.e., ads shown within a web page) remembered 3.4% more of the material than they did when exposed to pop-ups or pop-under ads. Pop-ups were found to be 24% more intrusive than in-line ads, and pop-unders were found to be 33.1% more intrusive than in-line ads.</p>

<p>There is a tradeoff between the number of ads displayed and the corresponding increase in download time and user frustration. More advertising leads to a greater number of servers referenced per web page. This can reduce performance with additional DNS lookups and the inability to group object retrievals over persistent HTTP connections. On average, each DNS lookup takes about 7.1 milliseconds (Bent and Voelker 2002). News sites had the highest percentage of pages with ads (85%) while reference sites had the lowest percentage (32%). Political sites had the highest number of ads per page with 25% of the external objects and 30% of the bytes due to ads.</p>
 
<h3>Ad Delays by Retrieval Method</h3>

<p>In analyzing the news category, Krishnamurthy and Wills tested how the retrieval method impacts the presence of advertising and response times. Under normal conditions (images on, JavaScript and Java on) they found that the average news page was a whopping 341K in total, with 84K worth of ads, composed of 48 objects served from 7.7 servers, with a mean download time of 10.4 seconds. Turning off JavaScript and Java cut the number of ads by 62% and total ad size by 71%. Under the same conditions, the total number of objects dropped by only 12%. This 50 percentage point difference plus the fact that no "class" objects were retrieved, show that webmasters rely mainly on JavaScript to include ads in their pages.</p>

<p>Turning off images and scripting cut the number of ads nearly to zero (0.5), the number of objects from 48 to 3.2, and total page size to 87K, nearly four times smaller. The median download time was cut by a factor of ten under these conditions, dropping from 10.4 to 1.3 seconds. Even though page size was reduced by a factor of four, download time was reduced by a factor of ten. You can see the influence of <a href="../parallel/">object overhead</a> as the number of objects increases.</p>
 
<p>Turning off ads with Adblock cut the number of objects and bytes served by about 27%, and the median download time by 33%. These results show that ads play a significant role in increasing the number of objects per page as well as download times. Since the number of ads dropped by 62% when turning off JavaScript, webmasters may want to consider alternative ad display techniques, like XSSI.</p>

<h3>Advertisements Distract Readers</h3>

<p>Advertisements have been shown to be distracting to readers. One eye tracking study found that ad graphics significantly increase regressions and re-reading of web page copy (Beymerl, Orton, and Russel 2007). On-task images also slowed readers down by decreasing first pass reading speed. The researchers attribute this effect to the "extra effort the reader is making to relate the pictures to the text - the cognitive effort to relate pictures and text is slowing down the reader." The researchers recommend that to minimize distractions, e-learning sites should avoid using advertisements and perhaps relegate them to separate pages.</p>

<h2>Conclusion</h2>

<p>The performance cost to the average web page with banner advertisements is about one-sixth more objects and one-third more latency. Internet advertising is a multi-billion dollar industry with advertisers competing to capture the attention of users. While the percentage of banner advertisements on the Web has shrunk by more than half from 2000 to 2004 (48% to 21%, Laffey 2007) since that time online advertising spending as a percentage of total media ad spending has more than doubled from 3.6% in 2004 to 7.4% in 2007 (Hallerman 2007). So the number of banner ads is still growing, as graphic search marketing ads appear on "content networks." The average web page had 48K of banner ads in 8.1 objects. Optimizing banner ads for file size will help reduce your size overhead while restraining yourself on their number will reduce object overhead. It would be interesting to see a study testing the tradeoff between the number and size of banner ads and bailout rates.</p>

<h2>Further Reading</h2>
<dl>
<dt>Baker, S., "The Online Ad Surge: Brand Advertising Online has Taken Off - and It is Shaking
Up Madison Ave,"</dt>
<dd><i>Business Week</i>, Nov. 22, 2004, 76.</dd>

<dt>Bent, L., and G. Voelker, "Whole Page Performance,"</dt>
<dd>in <i>WCW'02</i> (Boulder, CO: August 2002), </dd>
<dt>Beymerl, D., Orton, P., and D. Russel, "An Eye Tracking Study of How Pictures Influence
Online Reading,"</dt>
<dd> in <i>INTERACT 2007</i>, LNCS 4663, Part II (2007), 456-460.</dd>

<dt>Hallerman, D., "eMarketer US Advertising Spending"</dt>
<dd> (New York: eMarketer, Inc., Nov. 2007), 33, http://www.emarketer.com (Jan. 31, 2008).</dd>
<dt>Interactive Advertising Bureau, "IAB/PwC Release Fourth-Quarter and FY 2006 Internet Ad
Revenue Figures,"</dt>
<dd>March 7, 2007 (available at http://www.iab.net/).</dd>
 
<dt>Krishnamurthy, B., and C. Wills, "Cat and Mouse: Content Delivery Tradeoffs in Web Access,"</dt>
<dd>in <i>WWW 2006</i> (Edinburgh, Scotland: May 23-26, 2006), 337-346</dd>

<dt>Laffey, D., "Paid search: The innovation that changed the Web,"</dt>
<dd><i>Business Horizons</i> 50 (2007): 211-218.</dd>

<dt>McCoy, S., Everard, S., Polak, P., and D. Galletta, "The Effects of Online Advertising,"</dt>
<dd><i>Communications of the ACM</i> 50, no. 3 (2007): 84-88.</dd>

<dt>Robinson, H., Wysocka, A., and C. Hand, "Internet advertising effectiveness - The effect of design on click-through rates for banner ads,"</dt>
<dd><i>International Journal of Advertising</i> 26, no. 4 (2007): 527-541.</dd>
</dl>

]]>
    </content>
</entry>

<entry>
    <title>Optimize Parallel Downloads to Minimize Object Overhead</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/parallel/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=154" title="Optimize Parallel Downloads to Minimize Object Overhead" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.154</id>
    
    <published>2007-12-26T13:00:26Z</published>
    <updated>2008-04-25T14:25:50Z</updated>
    
    <summary>With the average web page growing past 50 external objects, object overhead now dominates most web page delays. Increasing parallel downloads by using multiple hostnames can realize up to a 40% improvement in web page latency.

</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Graphic optimization" />
    
        <category term="Server optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        With the average web page made up of more than 50 objects (Krishnamurthy and Wills 2006), object overhead now dominates the latency of most web pages (Yuan 2005). Following the recommendation of the HTTP 1.1 specification, browsers typically default to two simultaneous threads per hostname. As the number of HTTP requests required by a web page increase from 3 to 23,  the actual download time of objects as a percentage of total page download time drops from 50% to only 14% (see Figure 1). 
        <![CDATA[<div align="center">
<p><a href="object-overhead-big.png"><img src="object-overhead.png" width="526" height="285" alt="object latency overhead multiple objects" border="1"></a></p>
<h4>Figure 1: Object Retrieval Latency versus Number of Objects (used with permission)</h4></p>
</div>

<p>As the number of objects per page increases above four, the overhead of waiting for available threads and describing the object chunks being sent dominates the total page load time (80% to 86% at 20 and 23+ objects respectively), compared to the actual object retrieval time due to file size. The description time plus the wait time caused by limited parallelism contribute from 50% to 86% of total page retrieval delay. Chi and Li also found that once the number of embedded objects exceeds ten, the description (or definition) time increases to over 80% of the total object retrieval time (Chi and Li 2002). Note that you can significantly reduce the overhead of multiple objects (for more than 12 objects per page) by turning on keep-alive and spreading the requests over multiple servers (Hopkins 2007).</p>

<h2>Parallel Download Default Throttles Browsers</h2>

<p>The HTTP 1.1 specification, circa 1999, recommends that browsers and servers limit parallel requests to the same hostname to two (Fielding et al. 1999). Written before broadband was widely adopted, this specification was designed for narrowband connections. Most browsers comply with the multithreading recommendation of the specification, although downgrading to HTTP 1.0 boosts parallel downloads to four. So most web browsers are effectively throttled by this limit on parallel downloads if the objects in the web page they download are hosted on one hostname. There are two ways around this limitation:</p>

<ul>
<li>Serve your objects from multiple servers</li>
<li>Create multiple subdomains to serve from multiple hostnames</li>
</ul>  


<h2>Using Multiple Servers</h2>

<p>You can, of course, set up multiple object or image-hosting servers to boost the number of parallel downloads. For example:</p>

<pre><code>images1.domain.com
images2.domain.com
images3.domain.com</pre></code>

<p>Each of these subdomains does not have to be on a separate server, however.</p>

<h2>Using Multiple Hostnames on the Same Server</h2>

<p>A more elegant solution is to set up multiple subdomains that point to the same server. This technique fools browsers into believing objects are being served from different hostnames, thereby allowing more than two-threads per server. For example you can set:</p>

<pre><code>images1.domain.com  domain.com
images2.domain.com  domain.com
images3.domain.com  domain.com</pre></code>

<p>within your DNS zone record. Now you can reference different objects using different hostnames, even though they are on the same server! For example:</p>

<pre><code>&lt;img src="images1.domain.com/i/balloon.png" alt="balloon"&gt;
&lt;img src="images2.domain.com/i/flag.png" alt="flag"&gt;
&lt;img src="images3.domain.com/i/star.png" alt="star"&gt;</code></pre>

<p>All of these URLs point back to:</p>

<pre><code>domain.com/i/</code></pre>

<h2>Optimum Number of Hostnames to Minimize Object Overhead</h2>

<p>Two studies conducted by Yahoo! and Gomez demonstrate how increasing the number of hostnames can minimize parallel download delays. Steve Souders and Tenni Theurer of Yahoo! reported on a test in their Performance UI blog (Theurer and Souders 2007). Varying the number of hostnames, as well as object size, the Yahoo! engineers found that two hostnames gave the fastest response times for larger file sizes (see Figure 2). Theurer provided WSO with an updated figure showing the trends for response times versus the number of aliases and image file size.</p>

<div align="center">
<p><img src="response-time-v-aliases.png" width="571" height="385" alt="response time versus number of aliases" border="1"></p>
<h4>Figure 2: Median Response time versus Number of Aliases (used with permission)</h4></p>
</div>

<p>Ryan Breen of Gomez ran a test using a similar technique. He found a 40% improvement using three hostnames (see Figure 3).</p>

<div align="center">
<p><a href="connection-multiplexing-big.png"><img src="connection-multiplexing-small.png" width="587" height="281" alt="total page load time versus number of connections" border="1"></a></p>
<h4>Figure 3: Total page load time versus number of connections (2 and 6) (used with permission)</h4></p>
</div>

<h2>Conclusion</h2>

<p>With the average web page growing past 50 external objects, minimizing object overhead is critical to optimize web performance. You can minimize the number of objects by using <a href="../css-sprites/">CSS sprites</a>, <a href="../combine/">combining objects to minimize HTTP requests</a>, and <a href="../suture/">suturing CSS or JavaScript files</a> at the server. With today's faster broadband connections, boosting parallel downloads can realize up to a 40% improvement in web page latency. You can use two or three hostnames to serve objects from the same server to fool browsers into multithreading more objects.</p>

<h2>Further Reading</h2>
<dl>
<dt>Breen, R., "<a href="http://www.ajaxperformance.com/?p=33">Circumventing browser connection limits for fun and profit</a>,"</dt>
<dd>
Ajax Performance, Dec. 18, 2006, http://www.ajaxperformance.com/?p=33 (Dec. 24, 2007). Shows the benefits of using more than 2 connections per hostname when optimizing Ajax applications. Realized a 40% speedup in download times by dynamically assigning different subdomains to objects programmatically.
</dd>

<dt>Chi, C., and X. Li, "Understanding the Object Retrieval Dependence of Web Page Access,"</dt>
<dd><i>Proceedings of the 10th IEEE Int'l Symp. On Modeling, Analysis, &amp; Simulation of Computer &amp; Telecommunications Systems (MASCOTS'02)</i>. The CT (connection time) makes up from 6 to 17% of web object retrieval latency (send request to first byte received).</dd>

<dt>Fielding, R., et al., "<a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">Hypertext Transfer Protocol -- HTTP/1.1</a>,"</dt>
<dd>
World Wide Web Consortium, June 1999, http://www.w3.org/Protocols/rfc2616/rfc2616.html (Dec. 24, 2007). Specifies the HTTP 1.1 protocol, which defines how web servers interact with web browsers. The specification includes persistent connections to boost performance. The specification also recommends a maximum of 2 connections per hostname, which most browsers support.
</dd>
<dt>Hopkins, A., "<a href="http://www.die.net/musings/page_load_time/">Optimizing Page Load Time</a>,"</dt>
<dd>Shows some simulations of multiple hostnames, object size, and latency on effective download speed.</dd>

<dt>King, A., "<a href="../combine/">Combine Images to Save HTTP requests</a>,"</dt>
<dd>Website Optimization, LLC, Speed Tweak of the Week, May 31, 2006. Learn how to combine adjacent images and imagemap to save HTTP requests. This speed optimization technique saves round trips to the server for faster load times.</dd>

<dt>King, A., "<a href="../css-sprites/">CSS Sprites: How Yahoo.com and AOL.com Save HTTP Requests</a>,"</dt>
<dd>Website Optimization, LLC, Speed Tweak of the Week, Sept. 26, 2007. Learn how top sites use CSS sprites to improve website performance. Yahoo! and AOL.com use CSS sprites to save HTTP requests in their sites.</dd>

<dt>King, A., "<a href="http://www.websiteoptimization.com/speed/tweak/http/">Minimize HTTP Requests</a>,"</dt>
<dd>Website Optimization, LLC, Speed Tweak of the Week, Dec. 13, 2003. Combine CSS or JavaScript files to save HTTP requests before uploading to the server, to avoid the same-domain connection limit.</dt>

<dt>Krishnamurthy, B. and C. Wills, "Cat and Mouse: Content Delivery Tradeoffs in Web Access,"</dt>
<dd><i>WWW 2006</i>, May 23-26, 2006, Edinburgh, Scotland. Using an instrumented Firefox browser to test the top 100 Alexa pages in 13 categories the researchers found that extraneous content exists on the majority of popular pages, and that blocking this content buys a 25-30% reduction in objects downloaded and bytes, with a 33% decrease in page latency. Popular sites averaged 52 object per page, 8.1 of which were ads, served from 5.7 servers. </dd>

<dt>Theurer, T., and S. Souders, "<a href="http://yuiblog.com/blog/2007/04/11/performance-research-part-4/">Performance Research, Part 4: Maximizing Parallel Downloads in the Carpool Lane</a>,"</dt>
<dd>
Yahoo! User Interface Blog, April 11, 2007, http://yuiblog.com/blog/2007/04/11/performance-research-part-4/ (Dec. 24, 2007). Shows how for larger files 2 is the optimal number of aliases to enable 4 parallel downloads of external objects.
</dd>

<dt>Yuan, J., Chi, C.H., and Q. Sun, "A More Precise Model for Web Retrieval,"</dt>
<dd> <i>WWW 2005</i>, May 10-14, 2005, Chiba, Japan.. The researchers found that the Definition Time (DT) and Waiting Time (WT) of objects have a significant impact on the total latency of web object retrieval, yet they are largely ignored in object-level studies. The DT and WT composed from 50 to 85% of total wait time, depending on the number of objects in a page. Above four objects per page, "object overhead" dominates web page latency.</dd>
</dl>]]>
    </content>
</entry>

<entry>
    <title>Use Delta Encoding to Compress RSS newsfeeds</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/delta-compression/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=152" title="Use Delta Encoding to Compress RSS newsfeeds" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.152</id>
    
    <published>2007-11-30T22:03:29Z</published>
    <updated>2007-12-01T16:11:22Z</updated>
    
    <summary>Learn how to use delta encoding to compress your RSS XML newsfeeds. Save bandwidth by using delta compression for your RSS files.</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="JavaScript optimization" />
    
        <category term="Server optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        Delta encoding (also called delta compression) is a way to update web pages by sending the &quot;diffs&quot; or deltas between versions of a web page. The server (proxy or origin) sends only what has changed in the page since the last access. This technique greatly reduces the amount of data that is sent from server to browser. In some cases with pages that change slightly, the deltas are on the order of a few TCP/IP packets. As about 32% of page accesses are first-time visits, about 68% of page visits are eligible for delta compression. 
        <![CDATA[<p>There are a few different ways to implement delta encoding (1) by saving old versions of pages and sending differences, (2) by using reference files on the same server that are in the user's cache, and (3) by using "value-based web caching" that employs blocks of data already sent to the client, independent of file boundaries (Savant 2004).</p>

<h2>Same URL Delta Compression</h2>

<p>Delta compression for pages at the same URL typically achieves higher compression ratios than other schemes, but has some drawbacks. Sending deltas for the same URL assumes that the client has accessed the page in the past. On the Web, this is only true for 30% of web pages, according one study (Mogul 1997). This method also imposes costs to the origin or proxy server to save old versions of the same page to use as reference files.</p>

<h2>Different URL Delta Compression</h2>

<p>Delta compression for pages at different URLs typically achieves more modest compression ratios than the same URL method, but does not suffer from the overhead of the same URL method. Improvements of 1.7 times for all pages to 2.9 for eligible text or HTML data have been found over gzip compression (Savant 2004).</p>

<h2>Real-World Delta Compression</h2>

<p>Although delta encoding is part of the HTTP 1.1 specification (Mogul et al. 2001), it has not been widely adopted among browser and server vendors. However, there are delta compression products that use JavaScript instead. These are generally available through website acceleration appliances. Delta encoding is usually performed as an injected JavaScript that reassembles the differences between a base page and subsequent pages. It can reduce the page load down to a couple TCP packets in some cases, particularly when combined with gzip for text. <a href="http://www.cisco.com">Cisco</a> and <a href="http://www.citrix.com">Citrix</a> both offer products that use delta encoding.</p>

<h2>Delta Encoding and RSS</h2>

<p>While browsers and servers have been slow to adopt delta encoding for web sites, there is one area where it is becoming more popular: RSS newsfeeds. The problem with RSS is that most sites poll feeds for updates. For popular sites, this can add up to a lot of bandwidth (Scoble 2004). Delta encoding was proposed as a temporary solution to reduce the overhead of polling while a push-based model is adopted.</p>

<p>Sites that have adopted delta encoding for RSS newsfeeds report that the average request was reduced by 75% (see Figure 1). Bob Wyman estimates if everyone adopted the RFC3229 protocol for RSS newsfeeds the bandwidth for his now-defunct news aggregation site PubSub.com would have been reduced by two-thirds (Wyman 2004).</p>

<div align="center">
<table width="65%">
<tr><td align="center"><p><a href="delta-encoding-rss.jpg"><img src="delta-encoding-rss-small.png" width="100" height="111" alt="delta encoding in rss savings" title="delta encoding in rss bandwidth savings." border="1"></a></p></td>
<td>RSS feeds that are delta compressed are ~25% the size of requests that are not compressed. 
</td></tr>
<tr><td align="center"><p><b>Figure 1: Delta Encoding Savings for RSS Feeds (used with permission)</b></p></td>
<td></td></tr></table></div>

<p>The Windows RSS platform (Vista) supports this feature, as do a number of other RSS clients. WordPress supports delta encoding of RSS feeds, one option is listed in the references (Robinson 2004). To help conserve bandwidth on the Web ask your blog provider if their software supports delta encoding of RSS.</p>

<p>While delta encoded RSS can save bandwidth, sometimes it can bog down your server. For example, dynamically created feeds like those in WordPress can cause servers to become overloaded during traffic spikes. That is one advantage of Movable Type, it can use static RSS files which scale better under higher loads.</p>

<h2>Conclusion</h2>

<p>While delta encoding of XHTML, CSS, and JavaScript has not been widely adopted, there is one area where it is catching on: RSS newsfeeds. Delta compression of RSS newsfeeds can save 75% off of file sizes. A number of news aggregators now support delta compression of RSS newsfeeds, making this a viable option for blog-based sites. To delta compress other text-based web content, web site owners can employ acceleration appliances available from Cisco and Citrix.</p> 

<h2>Further Reading</h2>
<dl>
<dt>King, A., "<a href="../compress/">HTTP Compression</a>,"</dt>
<dd>Speed Tweak of the Week, Website Optimization, LLC, Dec. 2003. HTTP compression with gzip saved about 75% on average off of text file size.</dd>
<dt>Mogul, J., Krishnamurthy, B., Douglis, F., Feldmann, A., Goland, Y., and A. van Hoff, "Delta encoding in HTTP,"</dd>
<dd> RFC 3229, Dec 2001, <a href="http://www.ietf.org/rfc/rfc3229.txt">http://www.ietf.org/rfc/rfc3229.txt</a>.</dd>

<dt>Mogul, J. C., Douglis, F., Feldmann, A., and B. Krishnamurthy, "Potential benefits of delta-encoding and data compression for HTTP,"</dt>
<dd>In <i>Proc. of the ACM SIGCOMM ’97</i>, Cannes, France, Sept. 1997, 181-196.</dd>
 
<dt>Robinson, J., "<a href="http://blog.robinsonhouse.com/2004/09/rss-and-delta-encoding.html">RSS and Delta Encoding</a>,"</dt> 
<dd>The Robinson House, Sept. 2004. Delta encoding code for WordPress by James Robinson.</dd>

<dt>Savant, A., and T. Suel, "Server-Friendly Delta Compression for Efficient Web Access,"</dt>
<dd>in <i>Proc. of the 8th international workshop on web content caching and distributing</i>, 2004, 303-322.</dd>

<dt>Scoble, R., "<a href="http://radio.weblogs.com/0001011/2004/09/08.html#a8195">Full text RSS on MSDN gets turned off</a>,"</dt>
<dd>Scobleizer.com, Sept. 8, 2004, http://radio.weblogs.com/0001011/2004/09/08.html#a8195.</dd>


<dt>Wyman, B., "<a href="http://www.wyman.us/main/2004/09/using_rfc3229_w.html">Using RFC3229 with Feeds</a>,"</dt>
<dd>As I May Think, Sept. 13, 2004, http://www.wyman.us/main/2004/09/using_rfc3229_w.html.</dd>

 <dt>Wyman, B., "<a href="http://wyman.us/main/2004/10/massive_bandwid.html">Massive Bandwidth Savings Proven!</a>,"</dt>
<dd> As I May Think, Oct. 3, 2004, http://wyman.us/main/2004/10/massive_bandwid.html.</dd>

</dt>
</dl>]]>
    </content>
</entry>

<entry>
    <title>Suture CSS or JavaScript Files to Reduce HTTP Requests</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/suture/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=150" title="Suture CSS or JavaScript Files to Reduce HTTP Requests" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.150</id>
    
    <published>2007-10-31T21:30:15Z</published>
    <updated>2007-11-06T15:18:15Z</updated>
    
    <summary>Learn how to &quot;suture&quot; CSS or JavaScript files together before delivery from the server to save HTTP requests. You&apos;ll have your organization and eat it too with this server-side approach to merging files.</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="CSS optimization" />
    
        <category term="JavaScript optimization" />
    
        <category term="Server optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        <![CDATA[A server-side variation of <a href="../http/">merging CSS and JavaScript files</a> before uploading to the server is to do this digital suturing at the server. You can "suture" CSS or JavaScript files together before delivery from the server to save HTTP requests. Often developers create separate style sheets and scripts for organizational purposes, and import them into their pages as needed. There are two problems with this approach: ]]>
        <![CDATA[<ol>
<li>it requires additional HTTP requests, and </li>
<li>you can encounter the same-domain connection limit.</li>
</ol>
<p> Scripts that load in the head of your HTML document actually block the loading and parsing of other objects, until they are downloaded (Souders 2007). You can have your organization and eat it too by  combining style sheets or JavaScript files on demand to create one master file at the server with PHP or JSP. Done properly, these combined files can also be cached.</p>

<p>Here is how this digital surgery would work for CSS. You need to tell the server two things: first, to parse CSS files for PHP commands and second, to send the correct MIME type:</p>
<pre><code>AddHandler application/x-httpd-php .css
header('Content-type: text/css');</code></pre>
<p>Next you can merge your CSS files together with PHP inside the CSS file like this:</p>
<pre><code>&lt;?php
  include("layout.css");
  include("navigation.css");
  include("advanced.css");
?&gt;</code></pre>
<p>To deliver files based on browser environment variables (for example, to simulate an @import to filter out older browsers), you could use software like phpsniff available at <a href="http://sourceforge.net/projects/phpsniff/">Sourceforge phpsniff</a>.</p>
<h2>Caching Dynamic Files</h2>
<p>As specified above, the dynamic CSS file will not cache properly. If you add the following headers to the top of your PHP file after the content type, they will cache for three hours (adjust 10,800 seconds as necessary).</p>
<pre><code>header('Cache-control: must-revalidate');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 10800) . ' GMT');</code></pre>

<h2>Conclusion</h2>
<p>This article shows how to "suture" or merge CSS or JavaScript files together at the server to avoid costly HTTP requests, while still maintaining separation of logically discrete styles or behavior. Suturing can be done automatically with PHP or JSP code at the server, or by merging files manually by developers to <a href="../http/">minimize HTTP requests</a> to avoid the slight overhead of auto-suturing.</p>

<h2>Further Reading</h2>
<dl>
<dt><a href="http://www.fiftyfoureleven.com/weblog/web-development/css/css-php-organized-optimized">CSS + PHP: Organized and Optimized?</a></dt>
<dd>Explores the idea of suturing CSS files together with PHP. By Mike Papageorge of Fiftyfoureleven.</dd>
<dt>Souders, S., High Performance Web Sites</dt>
<dd>(Sebastopol, CA: O'Reilly Media, 2007), 45. Scripts block parallel downloading.</dd>

<dt><a href="http://www.websiteoptimization.com/speed/tweak/http/">Minimize HTTP Requests</a></dt>
<dd>Combine CSS or JavaScript files to save HTTP requests before uploading to the server, to avoid the same-domain connection limit.</dt>
</dl>
]]>
    </content>
</entry>

<entry>
    <title>CSS Sprites: How Yahoo.com and AOL.com Improve Web Performance</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/css-sprites/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=148" title="CSS Sprites: How Yahoo.com and AOL.com Improve Web Performance" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.148</id>
    
    <published>2007-09-26T15:17:58Z</published>
    <updated>2007-10-14T22:57:39Z</updated>
    
    <summary>Learn how AOL and Yahoo! use CSS sprites to improve performance for their busy home pages. CSS sprites save HTTP requests by using CSS positioning to selectively display composite background images. To maximize accessibility and usability, CSS sprites are best used for icons or decorative effects.
</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="CSS optimization" />
    
        <category term="Graphic optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
        <category term="XHTML optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        <![CDATA[CSS sprites group multiple images into one composite image and display them using CSS background positioning. You can save a significant amount of HTTP requests by consolidating your images into one or more composite sprites and using CSS to selectively display parts of the sprite within your web page. Now that the major browsers have evolved enough to support CSS backgrounds and positioning, more sites are adopting this performance technique. In fact, some of the busiest sites on the Web use CSS sprites to save HTTP requests. In this article we'll expand on our mini-CSS sprite example (<a href="../cssrollovers/">mono-image CSS rollovers</a>) to show how Yahoo! and AOL use sprites to improve performance. ]]>
        <![CDATA[<h2>A Brief CSS Sprite How-To</h2>
<p>The idea behind CSS sprites is to consolidate multiple images into one sprite and then selectively display portions of this sprite with positioning. The steps are as follows:</p>
<ul>
<li>Group multiple images together (usually icons or decorative images) into one sprite</li>
<li>Evenly space these images, aligned into one or more lines</li>
<li>Set this sprite to the background image of an element (usually a list)</li>
<li>Position the sprite to display the appropriate image by shifting the X or Y position by a multiple of the spacing</li>
<li>Enjoy the increased speed and reduced HTTP requests</li>
</ul>
<h2>Maximizing Web Performance at Yahoo! and AOL</h2>
<p>With millions of users, Yahoo! and AOL do everything they can to improve the user experience. Both AOL.com and Yahoo.com use CSS sprites to save numerous HTTP requests for their intricate interfaces. Both sites use CSS sprites to selectively display icons within their directories of services, and Yahoo! uses sprites elsewhere as well. Yahoo! and AOL use similar techniques, but implement sprites in different ways. First we'll look at AOL.com's implementation, to show a more flexible, but slightly less efficient approach. Next we'll look at Yahoo! to see how their inline style positioning works.</p>
<h3>AOL.com CSS Sprites</h3>
<p>AOL.com uses CSS sprites on their home page to  improve performance. AOL uses a CSS sprite for the icons in their main directory navigation bar (autos, finance, food, etc.) on the left side of their home page (see Figure 1).</p>
<div align="center"><p><a href="aol-sprites.png"><img src="aol-sprites-500x357.png" width="500" height="357" alt="aol.com home page css sprites" title="aol.com home page css sprites." border="1"></a></p><p><b>Figure 1: AOL.com Home Page uses CSS Sprites</b></p></div>
<p>Their main CSS file sets up the directory navigation bar list: </p>

<pre><code>&lt;link rel="stylesheet" type="text/css" href="http://www.aolcdn.com/_media/aolp_v23.1/main.css" /&gt;

#sm_col .dir ul li a, #sm_col .nav2 li a, #sm_col .nav3 li a {
	line-height:1.2em;
	padding:.28em 0 .28em 2.3em;
	border-bottom:1px solid #fff;
	overflow:hidden;
}
#sm_col .dir ul li a, #aiw, #sm_col .nav2 li a, #sm_col .nav3 li a {
	display:block;
	width:10.28em;
}
&#133;
#sm_col ul.serv li a:hover, #sm_col .nav2 li a:hover, #sm_col .nav3 li a:hover, .eight .dir ul li a:hover {
	background-color:#fff;
}</code></pre>

<p>This CSS sets the styles for the height of the directory menu, padding (with plenty of room for the background icon, 2.3em, on the left), a white border on the bottom and any overflow to be hidden. They display the anchor as a block to make it clickable and set the width to 10.28em, and set the rollover color to white. Note that AOL could use <code>background:</code> instead of <code>background-color:</code> here to save six bytes.</p>
<p>Then AOL sets the background of each directory class (as well as some other IDs) to "dir_sprite.png" (see Figure 2).</p>
<pre><code>.d1, .d2, .d3, .d4, .d5, .d6, .d7, .d8, .d9, .d10, .d11, .d12, .d13, .d14, .d15, .d16, .d17, .d18, .d19, .d20, .d21,.d22, .d23, .d24, .d25, .d26, .d27, .d28, .d29, .d30, .d31, #aim_sprTbEdt, #games_sprTbEdt, #sports_sprTbEdt, #weather_sprTbEdt, #radio_sprTbEdt, #horoscopes_sprTbEdt, #video_sprTbEdt {
	background:transparent url("dir_sprite.png") no-repeat 4px 0;
}</code></pre>

<div align="center"><p><a href="aol_dir_sprite.png"><img src="aol_dir_sprite-18x289.png" width="18" height="289" alt="aol.com css sprite" title="aol.com css sprite." border="1"></a></p><p><b>Figure 2: AOL.com dir_sprite.png (truncated) CSS Sprite</b></p></div>

<p>For the subsequent directory menu items, it is just a matter of shifting the background image down 36 or 38 pixels to show each subsequent icon.</p>

<pre><code>.d2 {
	background-position:4px -36px;
}
.d3 {
	background-position:4px -74px;
}
.d4 {
	background-position:4px -112px;
}</code></pre>

<p>The HTML code looks like this for the directory.</p>
<pre><code>&lt;div id="cols"&gt;
&lt;div id="sm_col"&gt;
&#133;
&lt;a name="dir"&gt;&lt;h6&gt;Directory&lt;/h6&gt;&lt;/a&gt;&lt;div class="dir"&gt;
&lt;ul id="om_dir_col1_" class="serv c"&gt;
&lt;li&gt;&lt;a id="d1" class="d1" href="http://autos.aol.com/?ncid=AOLCOMMautoNAVIdira0001"&gt;Autos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id="d2" class="d2" href="http://money.aol.com"&gt;Finance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id="d3" class="d31" href="http://food.aol.com"&gt;Food&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id="d4" class="d3" href="http://games.aol.com"&gt;Games&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id="d5" class="d4" href="http://body.aol.com"&gt;Health & Diet&lt;/a&gt;&lt;/li&gt;&#133;&lt;/ul&gt;</code></pre>
<p>AOL uses classes and IDs to label their menu items, while Yahoo embeds the style directly into the list items. AOL's version uses slightly more code, but is more flexible. Next let's look at Yahoo!'s implementation of CSS sprites.</p>

<h4>Caveats to CSS Sprites</h4>

<P>AOL engineers found that one downside with image sprites is that some devices seem to handle sprites in a memory-intensive manner. On the iPhone for example, AOL.com freezes the device, due to sprites. They found similar problems with the Sony Playstation. Presumably browser sniffing to deliver a non-sprite version of the page to sprite-challenged devices would be the cure.</p>

<h3>Yahoo.com! and CSS Sprites</h3>

<p>Yahoo uses CSS sprites on its home page to improve performance. The first set of icons is displayed in the "Check your mail status" section on the right of Yahoo.com! (see Figure 3).</p>
<div align="center"><p><a href="yahoo-sprites.jpg"><img src="yahoo-sprites-500x310.png" width="500" height="310" alt="yahoo.com home page css sprites" title="yahoo.com home page css sprites." border="1"></a></p><p><b>Figure 3: Yahoo.com Home Page uses CSS Sprites</b></p></div>

<p>Yahoo sets up the "patabs" section with contextual selectors specifying the width of the <code>li</code> items, as well as setting the <code>ul</code> to relative positioning.</p>

<pre><code>#patabs ul.patabs li{
color:#8899a9;
float:left;
min-width:113px;
width:33.2%;
}
#patabs ul.patabs{
position:relative;
z-index:10;
}
&#133;</code></pre>

<p>The <code>#patabs li .icon</code> rule loads the composite background sprite pa-icons2.gif (see Figure 4).</p>

<pre><code>#patabs li .icon{
display:block;
z-index:10;
padding:8px 0 9px 40px;
background:url(http://us.i1.yimg.com/us.yimg.com/i/ww/t7/pa-icons2.gif) 5px 3px no-repeat;
}
&#133;</code></pre>

<div align="center"><p><img src="yahoo-pa-icons.png" width="30" height="734" alt="yahoo.com pa-icons css sprite" title="yahoo.com pa-icons css sprite."></p><p><b>Figure 4: Yahoo.com pa-icons.gif CSS Sprite (truncated)</b></p></div>

<p>Next they change the background position to show only the icon that matches the tab ID (in this case <code>#messenger</code> and <code>#music</code>).</p>

<pre><code>#patabs #messenger .icon{
padding-left:31px;
background-position:2px -497px;
}
#patabs #music .icon{
background-position:5px -197px;
}
&#133;</code></pre>
<p>The <code>background-position: 5px -XYZpx</code> shifts the background loaded in the <code>#patabs li .icon</code> rule to display the appropriate icon. Next, all Yahoo has to do to show these icons is class the div with an ID of patabs, the ul with a class of <code>patabs</code>, the li span with a class of <code>icon</code>, and set the id of each li to the name that matches. Yahoo saves five HTTP requests by loading one composite CSS sprite for this section, rather than six separate images. Note that Yahoo automatically expands the tab on rollover with JavaScript.</p>
<pre><code>&lt;div id="patabs"&gt;
&lt;ul id="tabs1" class="patabs first"&gt;
&lt;li id="mail" class="first"&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;a id="pamail" accesskey="m" href="r/m2"&gt;&lt;span class="icon">Mail&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li id="messenger"&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;a id="pamsgr" href="r/p1"&gt;&lt;span class="icon"&gt;Messenger&lt;/span&gt;&lt;/a&gt;
&lt;/h4&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li id="music" class="last"&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;a id="pamusic" href="r/uf"&gt;&lt;span class="icon"&gt;Radio&lt;/span&gt;&lt;/a&gt;
&lt;/h4&gt;
&lt;/div&gt;
&lt;/li&gt;</code></pre>
<h4>Yahoo! Directory CSS Sprite</h4>
<p>For the main set of icons on the left side of Yahoo, they use a multiple column composite sprite (see Figure 5).</p>
<div align="center"><p><a href="yahoo-troughbig.gif"><img src="yahoo-trough.png" width="436" height="358" alt="yahoo.com pa-icons css sprite" title="yahoo.com pa-icons css sprite." border="1"></a></p><p><b>Figure 5: Yahoo.com trough.gif CSS Sprite (truncated)</b></p></div>

<p>The first two rules set up the list and the background image for the anchor within each li.</p>

<pre><code>#trough li{
padding:3px 0 3px 5px;
p\adding:3px 0;
margin-left:-15px;
ma\rgin-left:0;
}
#trough li a{
display:block;
_display:inline;
min-height:12px;
padding:3px 0 3px 25px;
margin:-1px 0 -2px;
background:url(http://us.i1.yimg.com/us.yimg.com/i/ww/sp/trough_1.4.gif) 0 0 no-repeat;
font:bold 84% verdana;
voice-family:"\"}\"";
voice-family:inherit;
property:value;
_margin-left:0;
}</code></pre>
<h5>CSS Hacks</h5>
<p>Note that Yahoo! uses a number of CSS hacks to allow for different browsers in their code.They also create different style sheets optimized for different user agents, a non-trivial amount of work. They include the backslash hack, underscore hack, voice family hack, and <code>property:value;</code> hack which is part of another CSS hack. Here are some URLs for more information on CSS hacks and filters.</p>

<ul>
<li><a href="http://www.javascriptkit.com/dhtmltutors/csshacks3.shtml">Includes Yahoo's property:value hack, not recommended</a></li>
<li><a href="http://centricle.com/ref/css/filters/">http://centricle.com/ref/css/filters/</a></li>
<li><a href="http://css-discuss.incutio.com/?page=FrontPage">http://css-discuss.incutio.com/?page=FrontPage</a></li>
<li><a href="http://websitetips.com/css/solutions/">http://websitetips.com/css/solutions/</a></li>
<li><a href="http://www.tantek.com/CSS/Examples/boxmodelhack.html">Tantek's Box Model Hack</a></li>
</ul>

<p>Next, Yahoo marks up the "trough" bulleted list on the left side of their home page. To access the second column, they shift the background 400 pixels to the left. So for the first item in the list, i.e., "answers," they shift the background sprite 400 pixels to the left, then 120 pixels down to display the green starred icon.</p>
<pre><code>&lt;div id="colcx"&gt;
&lt;div id="left"&gt;
&lt;div id="trough" class="md"&gt;
&lt;div class="bd"&gt;
&lt;div id="trough-cols" class="fixfloat"&gt;
&lt;ul id="trough-1" class="col1"&gt;
&lt;li&gt;&lt;a style="<style color="red">background-position:-400px -120px</style>" href="r/4d"&gt;Answers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style="background-position:-400px -440px" href="r/2h"&gt;Autos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style="background-position:0 -761px" href="r/25"&gt;Finance&lt;/a&gt;&lt;/li&gt;&#133;&lt;/ul&gt;</code></pre>
<p>Same idea as before, but the positioning is embedded within the code. They could accomplish the same effect by using:</p>
<pre><code>#trough .answers {background-position: -400px -120px;}</code></pre>
<p>within their style sheet, and using</p> 
<pre><code>&lt;li&gt;&lt;a style="answers" href="r/4d"&gt;Answers&lt;/a&gt;&lt;/li&gt;</code></pre>
<p>But adding these classes adds a bit more code since this is a one-off. You can create simple one-dimensional CSS sprites or use two or more columns for more complex applications. To maximize accessibility and usability, CSS sprites are best used for icons associated with links, or for decorative effects. AOL found that using CSS sprites for every graphic caused accessibility and usability problems for browsers in "High Contrast Mode" on Windows machines.</p>
<h2>Conclusion</h2>
<p>This article shows how AOL and Yahoo! use CSS sprites to improve performance for their busy home pages. CSS sprites save HTTP requests by using CSS positioning to selectively display composite background images. Another benefit of CSS sprites is that the combined image is often smaller in file size than the individual images, despite adding whitespace between images. The smaller size of sprites is due to the reduced overhead of multiple color tables and formatting information required by separate images. To maximize accessibility and usability, CSS sprites are best used for icons or decorative effects.</p>
<h2>Further Reading</h2>
<ul>
<li><a href="http://www.websiteoptimization.com/speed/tweak/cssrollovers/">Mono-Image CSS Rollovers</a> - Shows a CSS mini-sprite application.</li>
<li><a href="http://www.alistapart.com/articles/sprites/">CSS Sprites: Image Slicing's Kiss of Death</a> - From AListApart</li>
</ul>
]]>
    </content>
</entry>

<entry>
    <title>Mono-Image CSS Rollovers</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/cssrollovers/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=146" title="Mono-Image CSS Rollovers" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.146</id>
    
    <published>2007-09-01T00:26:17Z</published>
    <updated>2007-09-26T00:46:34Z</updated>
    
    <summary>Learn how to create menu rollovers with different graphic backgrounds with one image. Save HTTP requests by combining on and off images into one mini-sprite and position with CSS.</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="CSS optimization" />
    
        <category term="Graphic optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        CSS is traditionally used to create rollover effects with two or more images for menus and other elements. Menus can use on, off, or visited images to signify the state of the menu. Typically menus are created using multiple background images, however. The problem with this method is that it doubles the necessary HTTP requests and can cause flickering problems when the &quot;off&quot; image is not preloaded. A better way is to combine the on and off state images into one mini-sprite and switch the background position on rollover (see Figure 1). 
        <![CDATA[<div align="center"><p><img src="image-rolloverdualgood2.png" width="508" height="50" alt="multi-image rollover sprite" title="multi-image rollover sprite."</p>
<p><b>Figure 1: Multiple-image Rollover Sprite</b></p></div>
<p>Figure 1 shows the on and off image mini-sprite (enlarged for easier viewing). To display the on and off portion of our image we just need to change the background position in our menu. Here is the code:</p>
<pre><code>
a:link, a:visited {
	display: block;
	width: 127px;
 	height:25px;
	line-height: 25px;
	color: #000;
	text-decoration: none;
	background: #fc0 url(image-rolloverdual.png) no-repeat left top;
	text-indent: 25px;
}
a:hover {
	/* background: #c00; */
	background-position: right top;
	color: #fff;
}
</code></pre>

<p>The background in the off state (:link) positions the background image to the left and top showing the off state portion of the image. On rollover (:hover) the background position is shifted to the right displaying the "on" portion of the background image. The width value effectively clips the image to show only the portion of the image that you want displayed. You can also use this technique to highlight visited links. For extra credit, create the above effect entirely with CSS.</p>

<h2>Eliminating Browser Differences</h2>

<p>Note, you may want to zero out margin and padding values to eliminate rendering differences between browsers thus:</p>

<pre><code>a {
	margin:0;
	padding:0;
}
</code></pre>

<p>This however will zero out all the margins and padding for <em>all</em> links. Better still be specific in your selectors to avoid coding extra CSS.</p>

<pre><code>#nav ul li a {
	margin:0;
	padding:0;
....
}
</code></pre>

<h2>Hiding From Older Browsers</h2>
<p>Very old browsers (less than version 5) may not work with some of these positioning techniques. To hide your CSS from older browsers the @import method is the easiest to implement. For example:</p>

<pre><code>
&lt;link rel="stylesheet" type="text/css" href="basic.css" /&gt;
&lt;style type="text/css"&gt; @import "modern.css"; &lt;/style&gt;
</code></pre>

<p>Here is the <a href="rollover-dual.html">finished version of the dual rollover</a>.

]]>
    </content>
</entry>

<entry>
    <title>Minimize Noise to Maximize Graphic and Video Compression</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/noise/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=144" title="Minimize Noise to Maximize Graphic and Video Compression" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.144</id>
    
    <published>2007-07-30T12:18:42Z</published>
    <updated>2007-07-30T12:19:05Z</updated>
    
    <summary>Noise is the enemy of efficient multimedia optimization. Learn how to minimize the noise in your images and videos to maximize compression. </summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Graphic optimization" />
    
        <category term="Multimedia optimization" />
    
        <category term="Photography" />
    
        <category term="Speed optimization" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        Multimedia compression can be thought of as a war against unnecessary noise. Noise is the unwanted random dot pattern overlaid on videos and graphics when electronic noise is present, due in part to the random motion of electrons. Noise creeps into images, both still and motion, with the more lossy steps you take when manipulating images. These random dot patterns, or &quot;snow,&quot; prevent compression algorithms from working optimally, increasing file sizes. By minimizing the noise in your original images and videos, you can gain the maximum amount of compression when optimizing images and videos destined for the Web. 
        <![CDATA[<h2>Causes of Noise in Digital Cameras</h2>

<p>Low-quality equipment tends to create more noise than higher-quality equipment. For example, smaller digital sensors seen in point-and-shoot cameras are more prone to noise than larger format sensors seen in Canon and Nikon's full frame cameras. As you'd expect for the same number of pixels, smaller sensors have smaller pixels. Smaller pixels are less effective at gathering light, so their weaker signals must be amplified, increasing noise. The effect of small sensors is seen most at high ISO settings and in low light situations. Digital camera manufacturers include in-camera noise reduction, but most professionals and serious amateurs keep in-camera noise reduction low, and reduce noise in Photoshop or with specialized noise reduction tools for maximum control.</p>

<p>Noise can also be caused by scanning film, in the form of scratches or dust. High ISO film introduces grain, which is a form of analog noise. JPEG compression also introduces some noise into flat color areas at lower quality settings. Dithering is an ordered form of noise, and should be minimized to let palette-based compression algorithms find more repeated pixel patterns.</p>

<h2>Preventing Noise</h2>

<p>If you find noise in your images, then your equipment may not be good enough. Use the highest quality equipment possible. Even with the best equipment you can still have noise problems, especially in low light situations. Use faster lenses and larger photosites to increase the signal and reduce noise. Save your images, still and motion, using the highest quality output format (RAW versus JPEG for example) to avoid introducing unnecessary noise into your originals. Here are some tips on avoiding noise:</p>

<ul>
<li>Use fast lenses to increase signal</li>
<li>Use fast shutter speeds to avoid accumulated noise (faster than 1/60th of a second)</li>
<li>Use <a href="../stabilizer/">image stabilization</a> to avoid motion blur</li>
<li>Use low ISO settings below 100 and a <a href="../tripod/">tripod</a>, avoid high ISO settings</li>
<li>Use larger sensors</li>
<li>Use high quality video and still cameras</li>
<li>Use a lot of light</li>
<li>Use a flash</li>
<li>Use RAW or the highest quality output setting</li>
<li>Always work from originals if possible</li>
</ul>

<h2>The Effect of Noise on Image Compression</h2>

<p>In our tests, noise can increase the optimized file size of JPEGs up to 20% to 30% (see Figure 1). Adding 5% noise increases the high quality JPEG by 8%. Adding 10% noise increases the high quality JPEG by about 27%.</p>

<div align="center"><p><b>Figure 1: The Effect of Noise on JPEGs</b></p>
<table align="center" width="480">
<tr>
<td><img src="balloon-high.jpg" height="166" width="150" alt="balloon high no noise"></td>
<td><img src="balloon-high-5noise.jpg" height="166" width="150" alt="balloon high 5 noise"></td>
<td><img src="balloon-high-10noise.jpg" height="166" width="150" alt="balloon high 5 noise"></td>
</tr>
<tr>
<td>High quality = 13,711 bytes</td><td>High quality + 5% noise = 14,817 (8.06% larger)</td><td>High quality + 10% noise = 17,408 (26.9% larger)</td>
</tr>
</table>
</div>

<p>For palette-based images noise has a more significant effect (see Figure 2).</p> 

<div align="center"><p><b>Figure 2: The Effect of Noise on PNGs</b></p>
<table align="center">
<tr>
<td><img src="blue.png" height="200" width="200" alt="blue box no noise"></td>
<td><img src="blue5noise-32.png" height="200" width="200" alt="blue box 5 noise"></td>
<td><img src="blue10noise-32.png" height="200" width="200" alt="blue box 10 noise"></td>
</tr>
<tr>
<td>2 bits = 192 bytes</td><td>5% noise = 26,426 bytes</td><td>10% noise = 26,457 bytes</td>
</tr>
</table>
</div>

<h2>Noise Reduction for Videos</h2>

<p>You can deal with noise, to some degree, with the H.264 compressor (and others) that has a "deblocking filter." The de-blocking filter smooths out block artifacts which may occur in the image when using lower bitrates. Using the de-blocking filter may increase image quality considerably (see Figure 3).</p>

<div align="center"><p><b>Figure 3: Deblocking a Video in Episode Pro</b></p>
<p><img src="episode-pro-deblocking.png" width="350" height="125" alt="deblocking video in episode pro" title="deblocking video in episode pro."</p>
</div>

<p>This does help but the deblocking filter was designed to handle blocking problems that get introduced by the compression <em>not</em> by the camera. So this is a bit of a trick but it does work. What it does is looks at blocky artifacts and then tries to smooth or blend them together. Of course this happens at the expense of sharpness. You can use more specialized tools to reduce noise in videos like Neat Video for improved results.</p>

<h2>Noise Reduction for Graphics</h2>

<p>You can reduce noise with filters in Photoshop, Photoshop elements, or specialized software. The noise filter menu has a "reduce noise" option, that allows you to adjust strength, preserve details, reduce color noise, and remove JPEG artifacts. Figure 4 shows the settings we used to remove some of the noise from the 10% noise balloon above.
<div align="center"><p><b>Figure 4: Reduce Noise Filter</b></p>
<p><img src="reduce-noise2814x621.jpg" width="814" height="621" alt="reducing noise in Photoshop Elements" title="reducing noise in photoshop elements."</p>
</div>

<p>We found that the "remove JPEG artifacts" feature did not work well on our test balloon. The resulting balloon image is 12,534 bytes or 52.6% smaller (see Figure 5).</p>

<div align="center"><p><b>Figure 5: Reduced Noise Balloon</b></p>
<p><img src="balloon-high-10noise-remove.jpg" width="150" height="166" alt="reduced noise balloon" title="reduced noise balloon."</p>
</div>

<h2>Conclusion</h2>

<p>Noise is the enemy of multimedia compression. Avoid introducing noise into your images, both still and motion, by using high quality equipment, saving high quality output, and working from originals. Noise can increase the size of JPEGs by up to 20% to 30%, and palette-based images by a factor of 100. You can remove noise most effectively with specialized noise reduction software. Removing noise can save over 50% in file size.</p>

<h2>Further Reading</h2>

<dl>
<dt><a href="http://www.dpreview.com/articles/compactcamerahighiso/">Compact Camera High ISO Modes</a></dt>
<dd>Discusses the effects of noise in small format cameras at high ISO modes. Shows examples of noise at various settings.</dd>
<dt><a href="http://www.asf.com/">Digital GEM</a></dt>
<dd>Noise reduction software from Kodak.</dd>
<dt><a href="http://photo.net/equipment/digital/sensorsize/">Effects of the physical size of digicam sensors on performance</a></dt>
<dd>Bob Atkins compares different sized sensors on their photographic performance. Includes some information on noise in the comments.</dd>
<dt><a href="http://www.websiteoptimization.com/speed/tweak/stabilizer/">Multimedia: Use Image Stabilization</a></dt>
<dd>
Image stabilization creates sharper pictures by damping vibration to avoid motion blur. Gyroscopic stabilizers steady cameras for sharper photographs and videos.</dd>

<dt><a href="http://www.websiteoptimization.com/speed/tweak/tripod/">Multimedia: Use a Stable Tripod</a></dt>
<dd>A stable tripod creates sharper pictures and videos by damping out vibration. Sharper shots mean smaller multimedia destined for the Web.</dd>
<dt><a href="http://www.neatimage.com/">Neat Image</a></dt>
<dd>Stand alone software and plug-in designed to reduce noise in images for Photoshop and Coreldraw. Developed specifically for digital photography. Available for Mac and Windows.</dd>
<dt><a href="http://www.luminous-landscape.com/reviews/software/neatimage.shtml">Neat Image Pro Review</a></dt>
<dd>Luminous Landscape reviews Neat Image for noise reduction.</dd>
<dt><a href="http://www.neatvideo.com/">Neat Video</a></dt>
<dd>Neat Image's version of noise reduction for videos.</dd>
<dt><a href="http://www.picturecode.com/">Noise Ninja</a></dt>
<dd>Noise reduction plug-in available for Mac and Windows.</dd>
<dt><a href="http://www.michaelalmond.com/Articles/noise.htm">Noise Reduction Tool Comparison</a></dt>
<dd>Michael Almond compares different noise reduction software. Recommends Noise Ninja, Neat Image, and Picture Cooler.</dd>
<dt><a href="http://www.noiseware.com/">Noiseware</a></dt>
<dd>Photoshop plug-in for noise reduction. Available for Windows only.</dd>
<dt><a href="/speed/tweak/video/">Web Video Optimization Tips</a></dt>
<dd>Shows how to capture and optimize videos for the Web.</dd>
</dl>

]]>
    </content>
</entry>

<entry>
    <title>Web Video Optimization Tips</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/video/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=142" title="Web Video Optimization Tips" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.142</id>
    
    <published>2007-06-29T11:34:55Z</published>
    <updated>2007-07-25T21:22:08Z</updated>
    
    <summary>Optimizing web videos has become more important as the use and size of videos has increased on the Web. Learn some best practices to help optimize your videos.</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Multimedia optimization" />
    
        <category term="Speed optimization" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        While streaming-media files make up only a small portion of the total web objects on the average web page, less than 1.3% according to Levering &amp; Cutler (2006), a small fraction of streaming media is responsible for nearly half of the streaming media traffic (Chesire et a. 2001). In fact, YouTube is responsible for about 10% of all traffic on the Internet (Nowak 2007) and is growing at over 162% a year (see Table 1). Consequently the optimization of streaming media, movies in particular, is important to minimize load times, reduce bandwidth bills, and maximize web page speed. 
        <![CDATA[<style type="text/css">
<!--
.data tr.right th{text-align:right;}
.data tr th.left{text-align:left;}
.data td{text-align:left;}
-->
</style>
<p></p>
<div align="center">
<TABLE border="1" class="t data" align="center">
<colspan>
<col align="left">
 <col align="left">
 <col align="left">
 <col align="left">
</colspan>

<tr class="light">
<th>Site</th><th>Unique Visitors (1000s)<br>(June 2007)</th><th>Year-over-year growth</th></tr>
<tr><td>1.  YouTube</td><td>51,378</td><td>162%</td></tr>
<tr><td>2.  Google Video</td><td>17,759</td><td>137%</td></tr>
<tr><td>3.  AOL Video</td><td>15,687</td><td>114%</td></tr>
<tr><td>4.  Yahoo! Video</td><td>15,473</td><td>405%</td></tr>
<tr><td>5.  vids.myspace.com</td><td>15,281</td><td>69%</td></tr>
<tr><td>6.  MSN Video</td><td>11,967</td><td>8%</td></tr>
</table>
</div>

<h2>Video Production Tips</h2>

<p>To create highly optimizable videos you've got to have high quality originals. Video creation can be thought of as a war against unnecessary noise in your content. The more noise in your original, the less it can be compressed, and the larger the final result. Use a high quality digital video camera. Minimize pans, zooms, and subject motion and make sure your subject is well lit. Use a simple background and a solid tripod. Avoid hand-held shots, but if a tripod is not an option use a <a href="../stabilizer/">gyroscopic stabilizer</a> (ken-labs.com) or an image stabilized lens. The lower the noise, movement, and fine detail in the background the smaller the video.</p>

<ul>
<li>Minimize camera motion with a tripod</li>
<li>Minimize subject motion</li>
<li>Use a lot of light</li>
<li>Use a simple background</li>
<li>Avoid camera pans and zooms</li>
<li>Use professional equipment</li>
<li>Use a digital format</li>
</ul>

<h2>Video Optimization for the Web</h2>

<p>Movies optimized for the web should be short in duration, small in dimension, and optimized with the appropriate codec. We have seen movies that are 12 to 20 minutes long auto-loaded on home pages some 90-150MB in file size! People are more accepting of temporal compression (over time) than spatial compression (frame per frame). You can cut the frame rate from 15fps to 10fps or even 8fps, each frame will have 50 percent more data per frame for the same file size, which will increase the quality of the picture. The minimum dimensions should be 320x240 pixels, anything much smaller has less impact and is hard to view. For users with a high speed connection you can offer a 400x300 pixel video. To maintain quality, up the data rate in proportion to the image size. Remember that doubling image size (320x240 to 640x480) requires a 4X (not 2X) increase in data rate.</p>

<p>Use this data rate formula to help target your movie for the right delivery medium (especially with H.264).</p>

<p>Data Rate = (frames per second) X (movie width) X (movie height) divided by 29000</p>
<p>This translates to DR = FPS * W * H / 29000.</p>
<p>For example: A 320x240 movies with 15 frames per second needs to be compressed to about 39.7K of data per second.</p>

<p>After you've captured your video while minimizing noise edit any unnecessary frames and add titles and effects. The key to optimizing movies on the web is to break them up into smaller segments that are a few minutes long at most. Edit out the parts of the movie that aren't essential to your message, crop fuzzy edges, and reduce the dimensions to keep them to a reasonable file size. Use the minimum frame rate that gives an acceptable playback. Finally after editing out nonessential content, reducing dimensions and frame rate, optimize your videos with different codecs to see which creates the smallest acceptable file.</p>

<ul>
<li>Crop the fuzzy edges</li>
<li>Reduce video noise (with filters)</li>
<li>Adjust contrast</li>
<li>Adjust gamma level (for cross-platform viewing)</li>
<li>Restore black and white</li>
<li>Deinterlace</li>
</ul>

<h3>Compressing Videos for the Web</h3>

<p>Now that you've got your video prepared and adjusted it's time to compress it. This is called "encoding" in the jargon of the industry. You must compress the size of your video so it can be successfully streamed (or downloaded) to your target audience. Encoding is the process where this compression happens, and it is full of hard interdependent decisions:</p>

<ul>
<li><b>Streaming Media Format</b> - QuickTime versus RealMedia versus Windows Media</li>
<li><b>Supported playback platforms</b> - Microsoft Windows versus Macintosh, or both</li>
<li><b>Delivery method</b> - True real-time streaming versus HTTP streaming</li>
<li><b>Overall data rate</b> - Compression versus quality versus bandwidth required</li>
<li><b>Audio quality</b> - Mono versus stereo.</li>
<li><b>Codec</b> - H.264, Sorenson and WMV are the current champs</li>
</ul>

<p>You'll need to make some decisions here to give the best compromise between quality and size. <a href="http://www.apple.com/quicktime/">QuickTime Pro</a> is a fast and convenient way to create optimized videos. For more control you can use Cleaner, a product made by <a href="http://www.discreet.com">Discreet</a> (http://www.discreet.com). <a href="http://www.sorensonmedia.com/pages/?pageID=73">Sorenson Video Pro</a> can sometimes make smaller videos than <a href="http://www.apple.com/quicktime/technologies/h264/faq.html">H.264</a> at similar quality. Finally <a href="http://www.telestream.net/">Episode Pro</a> offers maximum control over video compression with the ability to compress to H.264, Flash, ipod, and other formats (see Figure 1).</p>

<div align="center"><p><a href="episodeprocrop.png"><img src="episodeprocrop2.png" width="630" height="714" alt="optimizing a video in episode pro" title="episode pro optimizing video." border="1"></a><br>
<a href="episodepro.png">Full Screen Version</a></p>
<p><b>Figure 1: Optimizing a Video in Episode Pro</b></p></div>

<p>Each product makes the job easier by wrapping these decisions into an intuitive interface. Here is an example of the settings we used for optimizing a video in Quicktime Pro for a dentist (<a href="http://www.fortlauderdaledentistry.com">Fort Lauderdale Dentist</a>) client we have in Florida (see Figure 2).</p>  

<div align="center"><p><img src="quicktime-pro-video32.png" width="366" height="448" alt="optimizing a video in quicktime pro" title="quicktime pro optimizing video."></p>
<p><b>Figure 2: Optimizing a Video in QuickTime Pro</b></p></div>

<p>The unoptimized 30 second video we received was 6.8 MB and the optimized video was 816K at 360x240 and 544K at 234x156, more than ten times smaller.</p>

<h2>Conclusion</h2>
<p>Creating optimized videos for the Web takes a number of coordinated steps. First create a clean, noise-free video with the minimum amount of zooms, pans, and background detail and movement as possible. Then prepare your video for compression by cropping fuzzy edges, adjusting contrast and gamma, and delete any unnecessary frames. Finally compress your video with a high quality compressor like Cleaner. Use the data-rate formula (W*H*FPS/29000) as a starting point, and always use a 2-pass VBR and a multiple of 10 times your FPS for your keyframes.</p>

<h2>Further Reading</h2>

<dl>

<dt>Chesire, M. Wolman, A., Voelker, G., & H. Levy (2001), "Measurement and Analysis of a Streaming-Media Workload,"</dt>
<dd>in <i>Proceedings of the Third USENIX Symposium on Internet Technologies and Systems</i> (Berkeley, CA: USENIX Association, 2001).</dd>

<dt>King, A. (2007), "<a href="/bw/0707/">Google Dominates Top Video Sites</a></dt>
<dd><i>Speed Tweak of the Week,</i> Website Optimization, LLC, July 16, 2007. With its acquisition of YouTube, Google now dominates the top video sharing sites with over 4.4 times as many unique users as its nearest competitor.</dd>
<dt>King, A. (2003), <i>Speed Up Your Site: Web Site Optimization</i></dt>
<dd>Some sections of this article were derived from Jason Wolf's chapter "Minimizing Multimedia."</dd>

<dt>Levering, R., and M. Cutler (2006), "The Portrait of a Common HTML Web Page,"</dt>
<dd>In <i>DocEng'06</i>, October 10-13, 2006, Amsterdam, The Netherlands. Paper surveyed over 21,000 web pages for visual features, position, and technology usage. Using a custom HTML rendering engine called WebSeer, the authors took a pseudo-random sample based on the DMOZ directory and found the proportion of image, text, form, and object usage and visual weight for the average web page.</dd>

<dt><a href="http://www.netratings.com">Nielsen//NetRatings</a></dt>
<dd>Provided the June 2007 video sharing site data to Website Optimization, LLC.</dd>
<dt>Nowak, P. (2007), "Google: You ain't seen nothin' yet,"</dt>
<dd>In <a href="http://www.canada.com/nationalpost/">The National Post</a>. "Forget iPhone, BlackBerry, Bell and Telus. Google is preparing to be the next giant of telecommunications." A story about how Google is asking the FCC to buy up wireless spectrum. With Google's infrastructure, it could become a telecommunications giant. Nowak reveals that YouTube accounts for nearly 10% of all traffic on the Internet. June 30, 2007.</dd>

<dt>Schonfeld, E. (2007), "<a href="http://blogs.business2.com/business2blog/2007/05/top_video_sites_1.html">Top Video Sites</a>,"</dt>
<dd>According to Nielsen//NetRatings
as of April 2007 the top video sites on the Internet are dominated by Google, who owns YouTube. Yahoo! Video shows the fastest growth rate of the top 12 video sites. Available from the Internet at: http://blogs.business2.com/business2blog/2007/05/top_video_sites_1.html (accessed on July 1, 2007)</dd>

</dl>
]]>
    </content>
</entry>

<entry>
    <title>Home Page Usability and Credibility Survey</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/homepage/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=140" title="Home Page Usability and Credibility Survey" />
    <id>tag:www.websiteoptimization.com,2007:/speed/tweak//3.140</id>
    
    <published>2007-05-31T20:24:27Z</published>
    <updated>2007-11-05T13:51:09Z</updated>
    
    <summary>A usability survey revealed that high growth companies are not evaluating and improving their home page designs in a systematic way. By comparing the home pages of the Fortune 30 against Inc Magazine&apos;s fastest growing companies, researchers from Minnesota State University found the Fortune 30 had a usability score over 36% higher than the fast growing companies.

</summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Psychology" />
    
        <category term="Web performance" />
    
        <category term="Website optimization" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        <![CDATA[The key to fast growth online is rapid customer responsiveness (Weill and Ross 2004). How a company executes its own web site is one indicator of how a company executes IT projects and values customer responsiveness. In order to determine the usability and credibility of top websites, researches from Minnesota State University compared the home pages of the fastest growing companies against the Fortune 30 (Brown, Rahman, &amp; Hacker 2006). The researchers found that the largest companies in the US used designs that were more consistent than the fastest growing companies, as defined by Nielsen and Tahir's best practices (2001). The fastest growing company home pages fared significantly worse in performance metrics. ]]>
        <![CDATA[<h2>Home Page Usability Guidelines</h2>

<p>Usability guidelines are generally derived from empirical studies, HCI research, and long years of experience. Schneiderman's "golden rules" of consistency are access to shortcuts and easy navigation, informative feedback, closure seeking dialog, error prevention and handling, easy reversal of actions, internal locus of control, and reduction of short-term memory load (Scheiderman 2004). Scheiderman and Nielsen (2001) promote measurable goals, adding ease of learning, retention of learning, speed of task completion, minimal error rates, and user satisfaction. Unfortunately surveys of usability guidelines have found little consistency among these rules.</p>

<h2>Credibility meets Usability Guidelines</h2>

<p>However, Brown and company found that the guidelines proposed by B. J. Fogg's credibility lab (2002) were mainly consistent with the home page guidelines of Niesen and Tahir (2001). The Stanford Persuasive Technology Lab issued the following ten web site design guidelines:</p>

<ol>
<li>Make it easy to verify the accuracy of the information on your site</li>
<li>Show that there's a real organization behind your site</li>
<li>Highlight the expertise in your organization and in the content and services you
provide</li>
<li>Show that honest and trustworthy people stand behind your site</li>
<li>Make it easy to contact you</li>
<li>Design your site so it looks professional</li>
<li>Make your site easy to use and useful</li>
<li>Update the site's content often</li>
<li>Use restraint with ads and offers</li>
<li>Avoid errors of all types</li>
</ol>

<p>The researchers adopted the guidelines of Nielsen and Tahir (2001) to test the Fortune 30 against the fastest growing company home pages for design consistency and usability. A total of 60 home pages were tested using quantifiable metrics. The Fortune 30 home pages tested were as follows:</p>

<table class="t data">
<tr>
<td>
<ol>
<li>Wal-Mart Stores Inc.</li>
<li>Exxon Mobil Corp.</li>
<li>General Motors Corp.</li>
<li>Ford Motor Co.</li>
<li>General Electric Co.</li>
<li>ChevronTexaco Corp.</li>
<li>ConocoPhillips</li>
<li>Citigroup Inc.</li>
<li>International Business Machines Corp.</li>
<li>American International Group, Inc.</li>
<li>Hewlett-Packard Co.</li>
<li>Verizon Communications Inc.</li>
<li>The Home Depot Inc.</li>
<li>Berkshire Hathaway Inc.</li>
<li>Altria Group Inc.</li>
</ol>
</td>
<td>
<ol start="16">
<li>McKesson Corp.</li>
<li>Cardinal Health Inc.</li>
<li>State Farm Insurance Co.</li>
<li>The Kroger Co.</li>
<li>Fannie Mae</li>
<li>The Boeing Co.</li>
<li>AmerisourceBergen Corp.</li>
<li>Target Corp.</li>
<li>Bank of America Corp.</li>
<li>Pfizer Inc.</li>
<li>J.P. Morgan Chase & Co.</li>
<li>Time Warner Inc.</li>
<li>The Procter & Gamble Co.</li>
<li>Costco Wholesale Corp.</li>
<li>Johnson & Johnson</li>
</ol>
</td>
</tr>
</table>

<p>The top 30 fastest growing companies were from Inc. Magazine's 2004 edition, listed as follows:</p>

<table class="t data">
<tr>
<td>
<ol>
<li>InPhonic - Washington, DC</li>
<li>uSight - Orem, UT</li>
<li>VCustomer - Seattle, WA</li>
<li>SeamlessWeb - New York City, NY</li>
<li>Liquidnet - New York City, NY</li>
<li>METI - El Paso, TX</li>
<li>Sullivan International Group - San Diego, CA</li>
<li>Go Daddy Group - Scottsdale, AZ</li>
<li>Stentor - Brisbane, CA</li>
<li>Coventry First - Fort Washington, PA</li>
<li>Enterprise Information Management - Lanoka Harbor, NJ</li>
<li>NetSuite - San Mateo, CA</li>
<li>DSL Extreme - Canoga Park, CA</li>
<li>SecureInfo - San Antonio, TX</li>
<li>Zappos.com - Las Vegas, CA</li>
</ol>
</td>
<td>
<ol start="16">
<li>Commodity Sourcing Group - Detroit, MI</li>
<li>C&S Marketing - Sacramento, CA</li>
<li>CodeCorrect - Yakima, WA</li>
<li>Telesis - Rockville, MD</li>
<li>Atrilogy Solutions Group - Irvine, CA</li>
<li>Red F - Charlotte, NC</li>
<li>ScripNet - Las Vegas, NV</li>
<li>Lydian Trust - Palm Beach, FL</li>
<li>Khimetrics - Scottsdale, AZ</li>
<li>PaySource - Dayton, OH</li>
<li>2Wire - San Jose, CA</li>
<li>Atlantic Credit & Finance - Roanoke, VA</li>
<li>New Edge Networks - Vancouver, WA</li>
<li>Preferred Systems Solutions - Fairfax, VA</li>
</ol>
</td>
</tr>
</table>

<h2>High Visibility means High Maintenance?</h2>

<p>Since the home page of a top website is the most visible aspect of a company, you would assume that management would periodically review the design and usability of their home page and it would represent a consensus view among said management. The researchers assumed that observations about home page design would provide some insights into IT governance. Fortune 30 companies undoubtedly have more resources to devote to usability testing and improvements than smaller fast growing companies. About 40 guidelines from Nielsen and Tahir (2001) were used to assess the usability of these top company home pages. Nielsen and Tahir found that only 28% of the top 50 home pages tested complied with the download time criteria (see Table 1).</p>

<style type="text/css">
<!--
.data tr.right th{text-align:right;}
.data tr th.left{text-align:left;}
.data td{text-align:left;}
-->
</style>

<h2 align="center">Table 1: Usability Trends in 50 High Profile Sites</h2>

<div align="center">
<TABLE border="1" class="t data" align="center">
<colspan>
<col align="left">
 <col align="left">
 <col align="left">
 <col align="left">
</colspan>
<TR class="light">
<TH>Guidelines</TH>
<TH>Recommended Design</TH>
<TH>Weight*</TH>
<TH>Trends in 50 High Profile Sites</TH>
</TR>
<TR>
<TH>Download Time</TH>
<td>At most 10 seconds at the prevalent connection speed</td>
<td>3</td>
<td>28 percent</td>
</tr>
<tr>
<th>Liquid Layout</th>
<td>Liquid = the page will expand to conform to any monitor size. Not fixed width</td>
<td>2</td>
<td>18 percent</td>
</tr>
<tr>
<th>Page Length</th>
<td>One or two full screens is best. No more than three full screens</td>
<td>3</td>
<td>Median = 2 screens</td>
</tr>
<tr>
<th>No frames</th>
<td>No</td>
<td>3</td>
<td>96%</td>
</tr>
<tr>
<th>No routing page</th>
<td>No</td>
<td>2</td>
<td>100%</td>
</tr>
<tr>
<th>No splash page</th>
<td>No</td>
<td>3</td>
<td>94 percent</td>
</tr>
<tr>
<th>No auto playing music</th>
<td>No</td>
<td>3</td>
<td>96 percent</td>
</tr>
<tr>
<th>No animation</th>
<td>No</td>
<td>2</td>
<td>70%</td>
</tr>
<tr>
<td colspan="4">*Notes: 3 is the most important, 1 is the least important
Source: Nielsen and Tahir (2001)</td>
</tr>
</table>
</div>

<h2>Fortune 30 versus Inc's Fastest Growing Company Home Pages</h2>

<p>Table 2 shows the usability ratings with significant differences between the Fortune 30 and Inc's fastest growting companies for Nielsen and Tahir's usability guidelines. Scores for "logo size" and "liquid layout" were significantly higher for the top 30 of Inc's list of high growth companies compared to the Fortune 30. </p>

<h2 align="center">Table 2: Summary of usability guidelines for 60 High Profile Home Pages</h2>

<div align="center">
<TABLE border="1" class="t data" align="center">
<colspan>
<col align="left">
 <col align="center">
 <col align="center">
 <col align="center">
 <col align="center">
</colspan>
<TR class="light">
<TH rowspan="2">Categories</TH>
<th colspan="2" class="center">Fortune 30</th>
<th colspan="2" class="center">Top 30 Inc. Sites</th>
</tr>
<tr class="light">
<TH>Mean</TH>
<TH>SD</TH>
<TH>Mean</TH>
<th>SD</th>
</TR>
<tr><th>Download time</th><td>2.80</td><td>0.76</td><td>2.00</td><td>1.44</td></tr>
<tr><th>Liquid layout</th><td>0.73</td><td>0.98</td><td>1.47</td><td>0.90</td></tr>
<tr><th>No-frames</th><td>2.90</td><td>0.55</td><td>2.40</td><td>1.22</td></tr>
<tr><th>Logo size</th><td>0.73</td><td>0.98</td><td>1.27</td><td>0.98</td></tr>
<tr><th>Search</th><td>2.70</td><td>0.92</td><td>0.50</td><td>1.14</td></tr>
<tr><th>Search placement</th><td>1.90</td><td>1.47</td><td>0.30</td><td>0.92</td></tr>
<tr><th>Search box color</th><td>2.70</td><td>0.92</td><td>0.50</td><td>1.14</td></tr>
<tr><th>Search button</th><td>0.93</td><td>1.01</td><td>0.07</td><td>0.37</td></tr>
<tr><th>Width of search box</th><td>0.40</td><td>0.81</td><td>0.00</td><td>0.00</td></tr>
<tr><th>Type of search</th><td>1.67</td><td>0.76</td><td>0.33</td><td>0.76</td></tr>
<tr><th>Footer navigation links</th><td> 0.73</td><td>0.45</td><td>0.33</td><td>0.48</td></tr>
<tr><th>Sitemap link</th><td>1.73</td><td>0.69</td><td>0.40</td><td>0.81</td></tr>
<tr><th>About the company</th><td>2.70</td><td>0.92</td><td>2.30</td><td>1.29</td></tr>
<tr><th>Privacy policy</th><td>2.90</td><td>0.55</td><td>1.20</td><td>1.49</td></tr>
<tr><th>Name of privacy link</th><td>0.60</td><td>0.93</td><td>0.67</td><td>0.96</td></tr>
<tr><th>Job openings</th><td>1.80</td><td>0.61</td><td>1.07</td><td>1.01</td></tr>
<tr><th>Advertising</th><td>1.80</td><td>0.61</td><td>0.93</td><td>1.01</td></tr>
<tr><th>Background color</th><td>1.87</td><td>0.51</td><td>1.33</td><td>0.96</td></tr>
<tr><th>Link underlining</th><td>1.93</td><td>0.37</td><td>1.53</td><td>0.86</td></tr>
<tr><th>Total</th><td>63.17</td><td>8.20</td><td>46.37</td><td>2.21</td></tr>
<tr><td colspan="5">This table shows summary of mean and standard deviations for usability guidelines with significant differences</td>
</tr>
</table>
</div>

<p>Overall, the Fortune 30 fared better than the fastest growing companies, with usability scores significantly higher for the following measures:</p>

<ul>
<li>Download time</li>
<li>No-frames</li>
<li>Search</li>
<li>Search placement</li>
<li>Search box color</li>
<li>Search button</li>
<li>Width of search box</li>
<li>Type of search</li>
<li>Footer navigation links</li>
<li>Sitemap link</li>
<li>Privacy policy</li>
<li>Job openings</li>
<li>Advertising</li>
<li>Background color</li>
<li>Link underlining</li>
</ul>

<p>In fact, five of the 40 categories account for almost all the differences:</li>

<ol>
<li>Liquid layout</li>
<li>Download time</li>
<li>Search features</li>
<li>Common features</li>
<li>Advertising</li>
</ol>

<p>Inc's top 30 did not use the search function as frequently as the Fortune 30 and required users to use other navigation.  Common navigational elements like "Sitemap" and "About the Company" were significantly lower for the high growth list. Download time scores for the Fortune 30 were significantly higher than the Inc 30 (2.8 versus 2.0 out of 3). Among the top five usability categories only liquid layout was higher in the fastest growing companies, with a score of 1.47 versus 0.73 for the Fortune 30.</p>

<h2>Conclusion</h2>

<p>This usability survey shows that high growth companies are not evaluating and improving their home page designs in a systematic way. The Fortune 30 companies overall usability score of 63.17 was over 36% higher than the 46.37 total score for the fastest growing companies. The download time scores were significantly lower for the fastest growing companies versus the Fortune 30. Perhaps fast growth redirects resources towards maintaining high growth rates and sales, with less focus on maintaining high website usability. Web-based companies would do well to follow the Fortune 30 example of devoting resources towards measuring and improving the usability of their home pages, and thus their entire websites.</p>

<h2>References</h2>

<ol>

<li>Brown, W., Rahman, M. &amp; T. Hacker (2006), "Home page usability and
credibility: A comparison of the fastest growing companies to the Fortune 30 and the implications to IT governance," Compared web site designs used by the fastest growing companies in the USA to the largest companies in the USA and benchmarked those designs against best practices as defined by Nielsen and Tahir.</li>

<li>Fogg, B.J. (2002), "Stanford guidelines for web credibility," A summary of credibility guidelines from the
Stanford Persuasive Technology Lab, Stanford University, Stanford, CA.</li>

<li>Fogg, B.J. (2003), <i>Persuasive Technology, Using Computers to Change What we Think and Do</i>,
Morgan Kaufmann, San Francisco, CA.</li>

<li>Nielsen, J. and Tahir (2001), <i>Homepage Usability: 50 Websites Deconstructed</i>, New Riders Press,
Indianapolis, IN.</li>

<li>Shneiderman, B. (2004), <i>Designing the User Interface: Strategies for Effective Human-Computer
Interaction, 4th ed.</i>, Addison-Wesley Longman, Reading, MA.</li>

<li>Weill, P. and Ross, J. (2004), <i>IT Governance: How Top Performers Manage IT Decision Rights for
Superior Results</i>, Harvard Business School Press, Boston, MA.
</ol>

]]>
    </content>
</entry>

<entry>
    <title>Update: Pro Ball Head Review</title>
    <link rel="alternate" type="text/html" href="http://www.websiteoptimization.com/speed/tweak/ballhead/" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.websiteoptimization.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=69" title="Update: Pro Ball Head Review" />
    <id>tag:www.websiteoptimization.com,2004:/speed/tweaktest//3.69</id>
    
    <published>2007-04-23T13:49:00Z</published>
    <updated>2007-04-24T18:01:31Z</updated>
    
    <summary>A solid ball head dampens sharpness-robbing vibration for sharper and smaller images and videos for the Web. Updated with the newest models, we compare some pro-level ball heads and offer some tips for sharper photographs. </summary>
    <author>
        <name>website optimization</name>
        <uri>http://www.websiteoptimization.com</uri>
    </author>
    
        <category term="Graphic optimization" />
    
        <category term="Multimedia optimization" />
    
        <category term="Photography" />
    
        <category term="Web performance" />
    
    <content type="html" xml:lang="en" xml:base="http://www.websiteoptimization.com/speed/tweak/">
        <![CDATA[Ball heads provide stability and mobility for photographers on the go. Combined with a <a href="http://www.websiteoptimization.com/speed/tweak/tripod/">stable tripod</a> a solid ball head can help dampen out vibration for sharper photographs, especially for larger enlargements. Sharper photographs and videos make for smaller, higher quality multimedia for the Web. This article reviews some professional ball head options and looks at vibration testing with a laser vibrometer. ]]>
        <![CDATA[<h2>What Is a Ball Head?</h2>

<p>A ball head sits atop a tripod to provide support for cameras and camcorders. Ball heads provide more flexibility than 3-axis "pan-tilt" heads, they're faster to use and lighter in weight. Aiming and leveling can be done in one fluid motion, a feat that would take multiple steps with a pan-tilt head (see Figure 1).</p> 
  
<div align="center">
<table align="center">
<tr>
<td align="center">
<img src="arca-swiss-250x248.jpg" width="250" height="248" alt="arca swiss b-1 ball head" title="arca swiss b1 ball head.">
</td>
<td>&#160;&#160;&#160;</td>
<td align="center">
<img src="arca-swiss-z1-flip-locksm2.jpg" width="185" height="236" alt="arca swiss z1 monoball head flip lock" title="arca swiss z1 monoball with flip lock.">
</td>
</tr>
<tr>
<th>Figure 1: The Arca-Swiss B1 Monoball Ball Head</th>
<th></th>
<th>Figure 2: Arca Swiss Z1 Monoball with Flip Lock</th>
</tr>
</table>
</div>

<p>Ball heads, like the author's Arca-Swiss B1 shown in Figure 1, are convenient for hiking. They have higher strength to weight ratios and fewer protruding knobs to catch on passing branches. Arca Swiss has replaced the B1 with the smaller Z1 monoball, shown with a flip lock lever (see Figure 2). Note that the flip lever version of the new Arca Swiss Z1 shown above is slightly lighter than the classic clamp model. Some users have complained that rotating the lower and smaller panning knob crimped their fingers on some tripod bases, so the knob has been replaced by a lever.</p>

<h2>What Kind of Ball Head?</h2>

<p>Ball heads come in different shapes and sizes designed to support different types of cameras. Like tripods they are rated by the amount of weight that they can support. The features to look for are ball diameter, multiple secure contact points to the ball, variable tension control, height (lower is better), and rated support weight. The larger the ball and the more secure the mechanism, the more solid the ball head. You can omit a panning base for less weight by panning with the ball. However, panning while your camera is flopped 90 degrees requires a panning base. Table 1 compares different pro-level ball heads.</p>

<table class="data t" cellspacing="0" cellpadding="5" border="1" align="center">
<caption><h3>Table 1: Ball Head Comparison</h3></caption>
<tr class="light"><th>Ball Head</th><th>Markins Q-Ball M20</th><th>Markins Q-Ball M20 TI^</th><th>Arca-Swiss B1^</th><th>Arca-Swiss Z1</th><th>RRS BH-55 Pro+</th><th>Kirk BH-1</th><th>Burzynski</th></tr>
<th class="right">Weight (gms/lbs)</th><td>568/1.25</td><td>640/1.41</td><td>780/1.72</td>
<td>680/1.5</td>

<td>843/1.86</td><td>849/1.875</td><td>1030/2.27</td></tr>
<th class="right">Ball diameter (mm)</th><td>48</td><td>48</td><td>54</td>
<td>54</td>
<td>55</td><td>53</td><td>60</td></tr>
<th class="right">Height (mm)</th><td>101</td><td>101</td><td>114</td>
<td>100</td>

<td>92.7</td><td>116</td><td>92</td></tr>
<th class="right">Load capacity (kg/lbs)</th><td>45/100</td><td>50/110</td><td>40.8/90</td>
<td>55.3/122</td>

<td>23/50</td><td>40/88</td><td>40-50/110</td></tr>
<th class="right">Load/weight*</th><td>80:1</td><td>78:1</td><td>52.4:1</td><td>81:1</td><td>26.9:1</td>

<td>46.9:1</td><td>48.5:1</td></tr>
</table>
<p><small>*Note that there is no standard test for load capacity, the maximum weights listed above are provided by the manufactures. In my opinion some may be optimistic, and some are conservative (like RRS) based on their design. A more useful measurement of stability would be to measure resistance to torque, which is where sharpness is lost. Since the center of gravity of the camera and lens is usually not exactly centered over the head and tripod, shutter vibration coupled with the camera/lens weight creates a twisting force (torque) that can cause  creep or "micro-slip" and even cause the lens to drop (otherwise known as flop). Creep can show up as reduced sharpness or blur in bigger enlargements. That is why video tripods (like Sachtler, Vinten, Miller, and high end photo pods like Dutch Hill, Manfrotto, and Ries) have 6 shafts, (2 in each leg) to resist torque for a more solid platform. Shutter and mirror vibration is better damped by composite materials, like carbon, wood, basalt, and fiberglass, rather than metal tripods.</small></p> 
<p><small>^The Markins Q-Ball M20-T and Arca Swiss B1 have been discontinued. Markins still offers the M-10 in a titanium version and Arca Swiss has replaced the B1 with the lighter and lower Z1 ball head.</small></p>
<p><small>+The Digital Picture reports that the quick-release clamp version of the RRS BH-50 Pro weighs 889 grams, or 1.96 lbs <a href="http://www.the-digital-picture.com/Reviews/Arca-Swiss-Monoball-Z1-Ballhead-Review.aspx">Arca Swiss Z1 Ball Head Review</a>.</small></p>

<h3>Ball Head Roundup</h3>

<p>With the above load capacity proviso in mind, the load to weight ratios are revealing here. The mid-range Markins head has a ratio of over 80:1 (see Figure 3), while the Arca Swiss B1 has a ratio of 52.4:1. The Arca Swiss Z1 has the highest load to weight ratio of 81:1. The Kirk BH-1 (and the smaller BH-3 at 19 oz) and Markins heads use a design similar to the Arca-Swiss B1 and Z1. The differences are the spherical versus aspherical ball (Kirk versus Arca-Swiss), weight, height, and quality of contact points to the ball. Since our last update, most of the manufacturers have reduced the weight of their ball heads (M20 and Kirk) or come out with new lighter models (Z1). The new weights and strength to weight ratios reflect these improved models (see Table 1).</p>

<h4>Markins Ball Heads</h4>

<p>Markins hard anodizes their aluminum balls, which they claim increases stiffness and reduces "micro-slip." Markins makes both aluminum and titanium versions of their M20 and M10 ball heads (48/44mm ball diameters respectively). They also offer "L" versions with left-handed controls that they claim are faster to operate in the field. Markins ball heads feature their patented bi-axial progressive locking mechanism that allows multiple points of contact to the ball which  allows for higher loads and lower plate heights. The weight of Markins' latest Q-Ball M20 has been reduced from 640 to 568 grams, including the clamp. Markins new Q-Ball Q3 "Emily" ball head weighs only 385 grams including the clamp, has a ball diameter of 38mm and supports up to 30 kg (see Figure 3).</p>

<div align="center"><p><img src="markins-qballs2.jpg" width="506" height="279" alt="markins q-balls q3, m10, and m20 ball head" title="markins q3, m10, m20 ball head."></p>
<p><b>Figure 3: Markins Q-Balls, Q3, M10, and M20 Ball Head</b></p></div>

<h4>Really Right Stuff Ball Heads</h4>

<p>The Really Right Stuff ball heads (RRS BH-55 Pro, BH-40, and BH-25) have a unique side-clamping design that allows a lower profile (see Figure 4). This innovative design gives the RRS heads a lower height (92.7mm) than the Arca Swiss-style heads, about as tall as the Burzynski head. Lower is better when it comes to reducing vibration due to the shorter beam length. Their load capacity estimate of 50 pounds seems conservative to me. Moose Peterson prefers the RRS BH-50 head, claiming the alignment between the panning base and the body is more precise for <a href="http://www.moosepeterson.com/digitaldarkroom/lessons/panoramas.html">stitched panoramas</a>.</p>

<div align="center"><p><img src="reallyrightstuff-ballheads2.jpg" width="540" height="208" alt="really right stuff bh-55 pro, BH-40, and BH-25" title="really right stuff bh-55 ball head."></p>
<p><b>Figure 4: Really Right Stuff BH-55 Pro, BH-40, and BH-25 Ball Heads</b></p></div>

<h4>Kirk Ball Heads</h4>

<p>Kirk Enterprises offers the BH-1 and BH-3 ball heads. The revised BH-1 has a 53mm ball diameter, and is designed to carry larger lenses without the occasional lockup problems of the Arca Swiss B1 (see Figure 5). Kirk has replaced the quick release plate with a redesigned model with a spirit level, and reduced the overall weight from 2 to 1.875 pounds. The smaller BH-3 has a 42mm ball and weighs 19 oz, and is designed to carry lenses smaller than 300/2.8 or 400/3.5.</p>

<div align="center"><p><img src="kirk-bh1.jpg" width="240" height="318" alt="kirk enterprises bh-1 ball head" title="kirk enterprises bh-1 ball head."></p>
<p><b>Figure 5: Kirk Enterprises BH-1 Ball Head</b></p></div>

<h4>Burzynski Ball Head</h4>

<p>The Burzynski head was designed to support telephoto lenses, but can be used with an "L" bracket to shoot landscapes, where the 45 degree tilt would not be a limitation. With its 60mm ball the Burzynski head is reportedly very stiff (see Figure 6), and can support 40 to 50 Kg large format cameras. The new model with a smaller 70mm base weighs 1030 grams.</p>

<div align="center"><p><img src="burzynski-235x160.jpg" width="235" height="160" alt="burzynski pro-tec ball head" border="1" title="burzynski pro-tec ball head."></p>
<p><b>Figure 6: Burzynski Pro-Tec Ball Head</b></p></div>

<p>Note that the Burzynski head can reportedly replace the top plate of the Gitzo 1325 tripod and be clamped in using the Gitzo top plate clamp. Replacing the top plate with the Burzynski would lower the head by about 14 mm from its 92mm height for a height of 78mm from the top of the tripod. Lower is better when it comes to ball heads, due to a lower  bending moment.</p>

<h4>Acratech Ball Heads</h4>

<p>Known for their Acratech Ultimate ball head, Acratech has released a variant on the theme with the V2 ball head. Weighing just 0.45 kg with a 38mm ball, the V2 can support over 25 lbs (see Figure 7).</p>

<div align="center"><p><img src="acratech-v2-ballhead.jpg" width="208" height="272" alt="acratech v2 ball head" title="acratech v2 ball head."></p>
<p><b>Figure 7: Acratech V2 Ball Head</b></p></div>

<h3>Titanium Ball Heads</h3>

<p>On the high end, Markins makes titanium versions of their M20 and M10 aluminum ball heads. Available in limited quantities, these titanium-bodied models use a hard-to-machine titanium-vanadium alloy that has a high stiffness to weight ratio. The M20-TI has a load to weight ratio of 78:1 (see Table 1