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

<channel>
    <title>Webmonkey &#187; YSlow</title>
    <atom:link href="http://www.webmonkey.com/tag/yslow/feed/" rel="self" type="application/rss+xml" />
    <link>http://www.webmonkey.com</link>
    <description>The Web Developer&#039;s Resource</description>
    <lastBuildDate>Fri, 05 Apr 2013 20:20:46 +0000</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>http://wordpress.org/?v=3.4.2</generator>
    
    <item>
        <title>Yahoo&#8217;s YSlow Now Available for Opera</title>
        <link>http://www.webmonkey.com/2011/08/yahoos-yslow-now-available-for-opera/</link>
        <comments>http://www.webmonkey.com/2011/08/yahoos-yslow-now-available-for-opera/#comments</comments>
        <pubDate>Fri, 12 Aug 2011 16:18:19 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=51366</guid>
        		<category><![CDATA[Software & Tools]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[YSlow]]></category>
        <description><![CDATA[YSlow, Yahoo&#8217;s web development tool (since released as an open source project, YSLow) designed to help you speed up your site&#8217;s page load times by showing you exactly what&#8217;s slowing them down, is now available for Opera. YSlow began life as a Firefox extension but has since been ported to Google Chrome, and is also [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2010/09/johnny_automatic_speeding_car-300x138.png" />YSlow, Yahoo&#8217;s web development tool (since released as an open source project, <a href="http://yslow.org/">YSLow</a>) designed to help you speed up your site&#8217;s page load times by showing you exactly what&#8217;s slowing them down, is now <a href="http://my.opera.com/ODIN/blog/2011/08/12/yslow-for-opera-out-now">available for Opera</a>. YSlow began life as a Firefox extension but has since been <a href="http://www.webmonkey.com/2011/03/yahoos-yslow-page-speed-tool-now-available-for-chrome/">ported to Google Chrome</a>, and is also available as a <a href="http://developer.yahoo.com/yslow/mobile/">JavaScript bookmarklet for mobile</a> and other browsers.</p>
<p>The new YSlow Opera extension is basically the JavaScript bookmarklet wrapped in some native code so that it gets its own toolbar button and settings file. If you&#8217;d like to add it to Opera, head on over to the Opera add-ons site and <a href="https://addons.opera.com/addons/extensions/details/yslow/3.0.5/">download a copy</a>.</p>
<p>Opera already ships with Dragonfly, an <a href="http://www.webmonkey.com/2011/05/opera-dragonfly-a-worthy-addition-your-web-development-toolkit/">impressive set of web development tools</a> to rival Firebug or anything you&#8217;ll find in Webkit browsers. Adding YSlow to the Opera toolkit makes the browser an even more compelling choice for web developers.</p>
<p><em>Illustration from &#8220;Physics for Entertainment&#8221; by Yakov Isidorovich Perelman from <a href="http://www.archive.org/details/physicsforentert035428mbp">Archive.org</a></em></p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2011/05/opera-dragonfly-a-worthy-addition-your-web-development-toolkit/">Opera Dragonfly a Worthy Addition Your Web Development Toolkit</a></li>
<li><a href="http://www.webmonkey.com/2011/03/yahoos-yslow-page-speed-tool-now-available-for-chrome/">Yahoo&#8217;s YSlow Page Speed Tool Now Available for Chrome</a></li>
<li><a href="http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/">How to Speed Up Your Site With YSlow and Page Speed</a></li>
<li><a href="http://www.webmonkey.com/2011/04/google-page-speed-now-works-in-any-web-browser/">Google Page Speed Now Works in any Web Browser</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2011/08/yahoos-yslow-now-available-for-opera/feed/</wfw:commentRss>
        <slash:comments>1</slash:comments>

        
    </item>
    
    <item>
        <title>Yahoo&#8217;s YSlow Page Speed Tool Now Available for Chrome</title>
        <link>http://www.webmonkey.com/2011/03/yahoos-yslow-page-speed-tool-now-available-for-chrome/</link>
        <comments>http://www.webmonkey.com/2011/03/yahoos-yslow-page-speed-tool-now-available-for-chrome/#comments</comments>
        <pubDate>Thu, 10 Mar 2011 17:16:43 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=50216</guid>
        		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Chromium]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[YSlow]]></category>
        <description><![CDATA[Every web developer wants to speed up their site, and Yahoo&#8217;s YSlow plugin for Firefox is a great way to find out what&#8217;s slowing your pages down. Now, Yahoo has announced YSlow for Chrome, which brings all the goodness of YSlow to Google&#8217;s popular web browser. In Firefox YSlow requires (and builds on) the Firebug [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2010/09/johnny_automatic_speeding_car-300x138.png" />Every web developer wants to speed up their site, and Yahoo&#8217;s YSlow plugin for Firefox is a great way to find out what&#8217;s slowing your pages down. Now, Yahoo has announced YSlow for Chrome, which brings all the goodness of YSlow to Google&#8217;s popular web browser.</p>
<p>In Firefox YSlow requires (and builds on) the Firebug plugin, but the Chrome version stands on its own. You can grab the new beta version of <a href="https://chrome.google.com/extensions/detail/ninejjcohidippngpapiilnmkgllmakh">YSlow for Chrome</a> from the Google Chrome Extension website (note that you&#8217;ll need to be using Chrome 10 or better).</p>
<p>Once installed, YSlow for Chrome works just like the Firefox version, with one nice difference &#8212; instead of being added to the bottom of the webpage as a kind of frame, YSlow for Chrome floats in its own window, which makes it easier to compare YSlow data from multiple websites.</p>
<p>The Yahoo developer blog <a href="http://developer.yahoo.com/blogs/ydn/posts/2011/03/yslow-for-chrome/">notes</a> that the current version of Chrome does not provide extensions access to its network panel. That means that YSlow for Chrome uses Ajax calls to cull its data and provide speed reports. As a result it&#8217;s possible that some rules might be affected and differ slightly from what the Firefox version reports. I tested a handful of domains in both Chromium and Firefox and didn&#8217;t notice any differences between the two, but be aware that it&#8217;s possible there might be some discrepancies.</p>
<p>For more information on how to use YSlow to speed up your websites, see our post, <a href="http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/">How to Speed Up Your Site With YSlow and Page Speed</a>. Sadly, there&#8217;s still no Page Speed add-on for Chrome; Google&#8217;s <a href="http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/">Speed Tracer extension</a> covers similar ground, but you&#8217;ll need to jump through some hoops to get it working.</p>
<p>Given Chrome&#8217;s already awesome built-in developer tools &#8212; which do more or less everything Firebug can do, no extensions necessary &#8212; adding YSlow to the mix puts Chrome on par with Firefox when it comes to the best browser for building and debugging your websites.</p>
<p><em>Illustration from &#8220;Physics for Entertainment&#8221; by Yakov Isidorovich Perelman from <a href="http://www.archive.org/details/physicsforentert035428mbp">Archive.org</a></em></p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/">How to Speed Up Your Site With YSlow and Page Speed</a></li>
<li><a href="http://www.webmonkey.com/2007/07/got_slow_web_pages_find_out_why_with_yslow/">Got Slow Web Pages? Find Out Why With YSlow</a></li>
<li><a href="http://www.webmonkey.com/2010/06/the-best-chrome-add-ons-for-web-developers/">The Best Chrome Add-ons for Web Developers</a></li>
<li><a href="http://www.webmonkey.com/2010/02/build_better_pages_with_firebug/">Build Better Pages With Firebug</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2011/03/yahoos-yslow-page-speed-tool-now-available-for-chrome/feed/</wfw:commentRss>
        <slash:comments>8</slash:comments>

        
    </item>
    
    <item>
        <title>How to Speed Up Your Site With YSlow and Page Speed</title>
        <link>http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/</link>
        <comments>http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/#comments</comments>
        <pubDate>Wed, 01 Sep 2010 19:00:42 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=48553</guid>
        		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Page Speed]]></category>
		<category><![CDATA[stylesheets]]></category>
		<category><![CDATA[YSlow]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2010/09/johnny_automatic_speeding_car.png" type="image/png" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2010/09/johnny_automatic_speeding_car.png" alt="How to Speed Up Your Site With YSlow and Page Speed" /></div>We all want our websites to load faster, but speeding things up can be tricky. There are numerous tried and true tricks we all use to keep page load times down, but once you&#8217;ve done a few rounds of optimization, you tend to hit a plateau where it&#8217;s tough to squeeze any more speed out [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><a href="http://www.webmonkey.com/wp-content/uploads/2010/09/johnny_automatic_speeding_car.png"><img src="http://www.webmonkey.com/wp-content/uploads/2010/09/johnny_automatic_speeding_car-300x138.png" alt="" title="johnny_automatic_speeding_car" width="300" height="138" class="alignright size-medium wp-image-48565" /></a>
<p>We all want our websites to load faster, but speeding things up can be tricky. There are numerous tried and true tricks we all use to keep page load times down, but once you&#8217;ve done a few rounds of optimization, you tend to hit a plateau where it&#8217;s tough to squeeze any more speed out of your code.</p>
<p>Most web developers are familiar with tools like <a href="http://yslow.org/">YSlow</a> and Google&#8217;s <a href="http://code.google.com/speed/page-speed/">Page Speed</a>. If you haven&#8217;t ever used them, go install both right now &#8212; they&#8217;re available as add-ons for Firefox. Both tools are designed to help you speed up your site&#8217;s page load times by showing you exactly what&#8217;s slowing them down, and used in tandem, they can alert you to some optimizations you never knew existed.</p>
<p>I recently sat down and tried, as best I could, to do everything that YSlow and PageSpeed recommended and I managed to shave my page load time roughly in half. When I started, my homepage took between four and six seconds to load. Now, it loads in one to three seconds on average.</p>
<p>To compare load times I used both YSlow and PageSpeed, as well as <a href="http://www.webpagetest.org/">WebPageTest</a>. Those numbers aren&#8217;t exactly benchmarks, since there&#8217;s some speed variation depending on what&#8217;s loaded in the cache, but a performance increase of about 30-40 percent is what you can expect if you haven&#8217;t yet explored these methods.</p>
<p>Some of what YSlow and Page Speed will tell you should be obvious &#8212; <a href="http://developer.yahoo.com/performance/rules.html#num_http">limit your HTTP requests</a>, <a href="http://developer.yahoo.com/performance/rules.html#minify">minimize</a>, compress and combine your JavaScript and CSS files, <a href="http://www.alistapart.com/articles/sprites">use CSS Sprites</a>, put your script tags at the bottom of the page and compress your images.</p>
<p>However, some of the more obscure and less-used (judging by viewing source code around the web) techniques these tools point out can make a surprising difference.</p>
<p>Before we get to the &#8220;how to&#8221; part, keep in mind the old saying &#8220;premature optimization is the root of all evil.&#8221; What I did with YSlow and its ilk was the last bit of optimization I did. In other words, be sure you&#8217;ve taken care of the big problems before you try to stamp out the smaller ones.</p>
<p>That said, I was surprised by how much of a difference some very small changes made.</p>
<p><span id="more-48553"></span></p>
<h3>The Good</h3>
<p>Long before I turned to YSlow, I optimized my backend code to minimize database hits, installed <a href="http://memcached.org/">Memcached</a> to further reduce the database load, and set up a separate domain to serve static files. The later change made a huge difference since the main instance of my site is running Apache and the static files are now served by a much lighter-weight, faster <a href="http://nginx.org/">Nginx</a> server.</p>
<p>The site I set out to test YSlow and Page Speed on is my <a href="http://luxagraf.net/">travel blog</a>, which is somewhat image-heavy. So, the first thing I did was run all my images through <a href="http://developer.yahoo.com/yslow/smushit/">SmushIt</a>, Yahoo&#8217;s lossless image compression tool that&#8217;s part of YSlow. </p>
<p>All of the images on the site were already compressed using Photoshop&#8217;s &#8220;Save for Web&#8221; exporter, but I still managed to shave an additional 2-5kb off my images without any loss of quality using SmushIt. When you&#8217;re loading ten or more images per page, that&#8217;s a significant savings.</p>
<p>In fact, I could compress my images quite a bit more if I were willing to make some trade-offs in image quality. I&#8217;m not in this case, but you might be able to. The best approach in my experience is to see what your overall image size is, run everything through SmushIt and, if you still aren&#8217;t happy with the results, go back to your image editor and see if you can compress things even more using lossy techniques.</p>
<h3>The Bad</h3>
<p>While I managed to squeeze down my images somewhat, for the most part I was already following the more obvious best practices &#8212; loading JavaScript last, using multiple domains and so on.</p>
<p>It wasn&#8217;t until I turned to my style sheets that I saw where I had really gone wrong.</p>
<p>Perhaps the most overlooked thing you can do to speed up your page is reduce the complexity of your style sheets. Wherever possible, use classes to group similar elements and make sure you take advantage of the cascade. If all your body text is going to be Georgia, define that rule once under the body tag rather than littering it throughout your style sheet.</p>
<p>Another thing you may notice Page Speed telling you to do is &#8220;<a href="http://code.google.com/speed/page-speed/docs/rendering.html#UseEfficientCSSSelectors">Use efficient CSS selectors</a>.&#8221; Browsers read CSS from right to left, so the more specific your selectors, the less time it takes the browser to figure out what to do with that element. The less specific the selector, the greater the number of nodes the browser needs to evaluate.</p>
<p>Consider this HTML, a fairly typical HTMl5 navigation menu:</p>
<p>
<pre class="brush: js">
&lt;nav id="top">
    &lt;ul>
        &lt;li>
            &lt;a href="/" title="My homepage">Home&lt;/a>
        &lt;/li>
        &lt;li>
            &lt;a href="/" title="My Blog">Blog&lt;/a>
        &lt;/li>
        &lt;li>
            &lt;a href="/" title="My Photos">Photos&lt;/a>
        &lt;/li>
    &lt;/ul>
&lt;/nav>
</pre>
<p>Now suppose you want to style the actual link element. The most inefficient way to do this would be something like this:</p>
<p>
<pre class="brush: js">
nav#top ul li a { color: red; }
</pre>
</p>
<p>In order to figure out which a you&#8217;re talking about, the browser needs to traverse four tags. Let&#8217;s redo that with something much more efficient:</p>
<p>
<pre class="brush: js">
&lt;h1>top a { color: red; }&lt;/h1>
</pre>
<p>Now there are just two tags to traverse. And note that we got rid of the <code>nav</code> selector with the ID, and the ID is already unique. There&#8217;s no need to add the tag as well.</p>
<p>If we wanted to be even more efficient, we could add a class called &#8220;red&#8221; to each of our <code>a</code> tags and simply do this:</p>
<p>
<pre class="brush: js">
.red {color: red;}
</pre>
<p>So how much does this gain you? In my case, re-writing my CSS &#8212; which had grown pretty sloppy over the years &#8212; dropped a full second from my page load time. That may not sound like much (and it isn&#8217;t if you have inefficient database queries or other, bigger problems), but when it comes to this stage of optimization, every little bit helps.</p>
<h3>The Ugly</h3>
<p>A few of YSlow and Page Speed&#8217;s suggestions aren&#8217;t possible in some cases, mine included. One big thing that could speed up my static content would be to use a CDN. Unfortunately CDN&#8217;s are expensive and outside the price range of small blogs like mine. Also, a shared server is cheaper than a dedicated server, but can be slower.</p>
<p>Other unfixable problems are due to my hosting setup. I can&#8217;t set the expires headers for my static files because my Nginx server is global for all shared hosts on that server. Luckily, with Nginx, the first load is pretty fast. The browser may not cache images and static files as aggressively as I&#8217;d like, but for now it works well enough. I could compile my own instance of Nginx, and thus set the expires headers myself, but I haven&#8217;t tried that yet.</p>
<p>Another problem that Google&#8217;s Page Speed tool likes to nag you about is using cookie-less domains for static images. In my case, I serve my static files from the subdomains <code>media</code> and <code>images</code>. Because my top-level domain needs cookies, the subdomains inherit them as well. This is why big sites like Yahoo use an entirely separate domain for static files (usually some subdomain of yimg.com in Yahoo&#8217;s case). </p>
<p>There are some other areas that didn&#8217;t apply in my case, but may be slowing down your site. One big culprit is third-party content. If you&#8217;re loading JavaScript from other sites &#8212; to add social networking or bookmarking buttons, for example &#8212; pay close attention to how fast those scripts load. They are notorious for slowing your page down.</p>
<p>Another easy way to speed up your pages is to make sure your CSS and JavaScript files are served using GZip compression. Good web hosts should offer a way to do this. If yours doesn&#8217;t, consider jumping ship for one that does.</p>
<p>As with any kind of optimization, there are trade-offs involved with nearly everything that YSlow and Page Speed will suggest. For example, to make your CSS selectors more efficient, you may be tempted to litter your HTML with IDs, which is a no-no if you&#8217;re trying to maintain good semantic code. Likewise, compressing images is all good and well, but turn them into a pixelated mess and you&#8217;ll turn people off no matter how fast your site is.</p>
<p>The secret to good optimization is to find a balance. Provide quality content and wrap it in well-written code, but also make sure what you create loads as fast as possible. Don&#8217;t sacrifice too much quality in the name of speed, and vice versa.</p>
<p><em>Illustration from &#8220;Physics for Entertainment&#8221; by Yakov Isidorovich Perelman from <a href="http://www.archive.org/details/physicsforentert035428mbp">Archive.org</a></em></p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2009/12/new_google_tools_help_speed_up_your_website/">New Google Tools Help Speed Up Your Website</a></li>
<li><a href="http://www.webmonkey.com/2008/03/tips_for_turning_your_sluggish_website_into_a_speed_demon/">Tips For Turning Your Sluggish Website Into a Speed Demon</a></li>
<li><a href="http://www.webmonkey.com/2010/02/Site_Optimization_Tutorial/">Site Optimization Tutorial</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/09/how-to-speed-up-your-site-with-yslow-and-page-speed/feed/</wfw:commentRss>
        <slash:comments>3</slash:comments>

        
    </item>
    </channel>
</rss>