Speeding Up Websites With YSlow

Speeding Up Websites With YSlow

Tutorial Details
  • Topic: Yahoo's YSlow FireFox Plugin
  • Difficulty: Intermediate

We all know there are countless reasons why web page load-times skyrocket, however, pinpointing the problem may be costly in both time and money. So why waste the effort when someone else—or something else—can do all the dirty work for you?

Meet Yahoo’s YSlow, a free web page analyzer for Firefox.


Getting Started

YSlow has two requirements:

YSlow piggybacks onto Firebug, so you will need to install the add-ons in the order listed above before continuing.


The Problem

Web designers, developers and copywriters strive to have the most unique and interesting content when compared to their competitors.

You may have spent days perfecting your new blog post and nearly fallen off your chair with excitement when viewing it for the first time. But, after a torrent of visitors flood your website, you notice things are no longer running smoothly. Under pressure, your new website might respond like a Commadore 64.


The Solution: Yahoo’s YSlow for Firefox

Yahoo's YSlow for Firefox

Website analysis tools generally fall into two categories:

  1. Search engine optimization
  2. Analysis of the Document Object Model’s (DOM) performance.

YSlow fits into the latter. It uses predefined rule sets to grade the performance of a web page, and third-party tools (such as Smush.it and JS Minifiers) to help resolve any problems.

There are three views:

  1. Grade
  2. Components
  3. Statistics.

YSlow includes six helpful tools: these range from JavaScript code testing to image optimization through Smush.It (another free web application from Yahoo). The entire application is wrapped up inside Firebug’s pop-up window, which can be opened and closed by a handy icon on the task bar of the browser.

Let’s jump right in with a closer look at the ‘Grade’ view.


1. Grade View

Yahoo! YSlow's Grade View

Using Envato’s home page as an example, which is a relatively low traffic site, we see the overall performance score is rated at 74 out of 100, with a yellow “C” Grade. But what does this really mean? After all, the web page renders perfectly well in the browser. Well, we need to take a closer look at the rules on the left of the view to figure this out.

Rules are divided into categories: content, cookies, CSS, images, JavaScript and server. As YSlow inspected elements of the DOM, it graded each one on a predefined rule-set (in this case YSlow V2). The closer an element stuck to the rules, the higher it scored. After all of the scores are collected, the final grade was awarded.

In the case of Envato, all of the user interface rules scored highly, but the server rules performed less efficiently. This lowered the final grade.

Thankfully each rule explains where the problem lies and provides a detailed explanation on how to resolve the issue. This feature will provide a huge relief to anyone new to optimizing websites.


Rule-sets

To some, certain rules are more important than others. YSlow provides you with a default rule-set, but also allows you to switch to ‘classic’, ‘small site or blog’ or create your own. If you do not care about using Content Delivery Networks, then simply edit a rule-set and remove that function. It really couldn’t be easier.


Components View

Yahoo YSlow's Components View

The components view lists the elements from an analysis in a clean, expandable data table.

While this section provides a more in-depth analysis, data such as a file expiration date or response time, may be helpful to understand problematic areas. If you have GZIP compression enabled, you can view the file size difference here.


Statistics View

YSlow statistics view showing graph data

Everyone loves a graph. YSlow does too.

The statistics page is a fast and simple way of understanding the total weight of your HTTP requests. Put simply, there are two graphs: empty cache and primed cache. These graphs break your website down into HTML, JavaScript, images and so on. The file sizes of each are then displayed as pie segments. Empty Cache represents a browser’s first visit to the web page. Prime Cache indicates which components would or would not be in the browser’s cache when revisiting. Clean, clear and effective.


Tools

Finally, we have tools. Immediately, you will notice a lack of specificity toward the analyzed web page, but don’t be fooled. Each tool is a powerful time saver when it comes to shrinking, minifying and compressing your content. If you are familiar with the concept of optimization, then you may have come across similar tools before.

When reducing page load times, it is important to remove white space and comments from your documents, and optimize your images.

Thankfully these tools perform all the hard work for you, because doing this by hand will undoubtedly take you deep into the night. No amount of energy drinks will keep you from going insane after you delete a JavaScript function by accident for the hundredth time.

There are eight tools altogether; covering all of them would take a couple of articles. So, I will concentrate on Yahoo! Smush.it as an example.

YSlow will automatically upload images for compression

Yahoo! Smush.it is a small web application, which can be used with YSlow or straight from your browser.

Quite simply, Smush.it is a lossless image optimiser. YSlow uploads the images for you, which are ‘smushed’ and presented in a table where you can view the new image, size, and compression savings percentage.

You can even keep the files in the same directory structure and download them all as a handy zip file.

There are plenty of free applications with similar tools, but the ones packaged with YSlow are a welcomed addition.


Working on Envato’s YSlow Grade

As I mentioned earlier, Envato’s YSlow performance score is 74 with a grade of C. Let’s take some time to analyze YSlow’s results, and what could be done to improve the final score.

Here are their suggested improvements, starting from the top:

Make Fewer HTTP Requests: Grade E

This rule goes on to detail that there are six external JavaScript scripts and 17 external background images. Their suggestion is to combine the files and use CSS sprites to resolve the issue.

The first thing to do is take a look at the Components View, and in particular, the JS files.

As the URLs show, only one JavaScript file is hosted on the same server as the analyzed page, this contains customized JavaScript for WordPress. Two are required for JQuery, and Google Analytics, and the final three are from formspring.com.

If the JavaScript files were my own, I might consider combining the custom applications.js and formspring JS files into one and hosting them locally. However, only the application.js file appears to be customized. So, I really don’t want to be playing around with someone else’s work. Especially as some of those files are lacking license/copyright information.

Using Google’s hosting for jQuery is also considered to be good practice, however, they should update to the most recent version of jQuery: 1.4.2.

So in this case, it’s probably best to ignore this rule as any modification to the current methods could result in some problems further down the line. My only real concern is the response time for two of the FormStack files, at this time, they each talk over 360 ms to respond. If this continues, it may be worth finding a method to host them locally.

Images

Next we review the images; all are hosted locally, respond within 40 ms and are quite small in size. This tells us that individually, these files are already optimized for this page. YSlow suggests that we combine these images and use CSS sprites to improve our grade.

If you’re unfamiliar with CSS sprites, you can click on the “Read more” link, which will take you to Yahoo!’s Best Practices for Speeding up Your Website page.

In this case, by using one optimized image we should see an improvement in image response time. CSS sprites work by combining your background images to one and then using CSS to align that image with background-image and background-position. There is nothing special about the CSS used, so it should be compatible with all major browsers.

Use a Content Delivery Network (CDN): Grade F

Many websites will have an F grade for this rule, due to the fact that it takes a bit of work to setup; however, the benefits are more than worth the time cost. Additionally, services like Amazon offer surprisingly cheap hosting. While Envato absolutely uses CDNs for its high traffic sites, like Nettuts+, they may have decided that it’s not necessary for a lower traffic site.

Add Expires Headers: Grade F

Again, we are confronted by a rule which is concerned with HTTP requests. Expires headers are common, because they allow components to become cacheable. Cached components (images, JavaScript, etc) save time and bandwidth for repeated visits to a web page. So it is worth implementing expiration dates for your content.

YSlow found 55 components “without a far-future expiration date” after analyzing Envato.com. Most of the components are background images. We know from the first suggestion, “Make fewer HTTP requests,” that we can use CSS sprites to reduce the number of background images, automatically improving this grade.

Setting up “Expires” headers is generally a simple process, and typically only requires a quick addition to your .htaccess file. Once applied, all of your components should now have appropriate expires headers without any further file manipulation or modification. In order to gain full insight into working with your .htaccess file and headers requires an article unto itself. Rather than go into detail here, I have included a set of helpful links for further reading:

Put CSS at Top: Grade B

YSlow found one stylesheet outside of the Head element for Envato. Thankfully, this is the simplest rule to rectify. By keeping style sheets at the top of your web page, you automatically increase the speed at which your web page will load. Once moved, YSlow should report a grade A for this rule.

Minify JavaScript and CSS: Grade D

Removing unused white space in your documents reduces the size of the document, and thus increases the speed at which the file is downloaded. As I mentioned earlier, YSlow provides us with a minification tool, so all the hard work can be done for us.

Head over to the Tools view and select YUI CSS Compressor. In the blink of an eye, your CSS files are minified and available for download. Quick, clean, and simple.

Configure Entity Tags (ETags): Grade C

ETags provide a way to validate a specific version of a web page component (images, JavaScript, etc). They work with the web server to match a browser’s cached content against the content on the web server. Unfortunately, YSlow has picked up on two missing ETags for files hosted on formspring.com. Due to this, it might be best to follow YSlow’s suggestion and remove ETags altogether. This can be done by adding “FileETag none” to your Apache configuration file. You should now see an improvement in this rules grade.


Alternatives

There are many alternatives when it comes to website analysis, and I wouldn’t be surprised if you had your favorites. Along with YSlow, I use another four free analyzers. As you might expect, each one offers unique features, and, for this reason alone, I think it is important to remember that no one tool can provide an absolute bullet-proof report.

To provide you with an idea of how different each of these generates a final outcome, I have included a brief description and the score given to Envato’s website.

Web Page Test

Provided by AOL, this application adds a variety of settings to your analysis. You can simulate browser version, connection speed, and perform visual comparisons to other URLs. It’s a great feature if you wish to start A/B Testing.

Score: N/A. Provides an optimization checklist and load timings.

PageSpeed

PageSpeed is another add-on for Firefox and Firebug. This even shows up in the same menu as YSlow and provides a similar analysis. Like YSlow, it uses rules and reports back on how well each component performs. It will even optimize and minify your content.

Score: 76/100

WooRank

Still in beta, this free web application will check your content, Alexa ranking, traffic, search engine optimization, geo metadata and more. Again, helpful hints are added with each analysis. You can even add a widget to your website, showing off your ‘woorank score’.

Score: 65.8/100

Website Grader

Grader is another free web application, also available for the iPhone. This tool is quite similar to WooRank, with a clean and detailed interface. There is even a dedicated tool for analyzing blogs: a unique feature out of the five listed in this article.

Score: 99/100


Pros of YSlow

  • Includes the option to automatically analyze web pages.
  • Costs nothing and is free from advertising.
  • Rule sets are customizable. For example, if you’re not concerned with content delivery networks, you can simply turn this option off.
  • Automatically uploads all the images from web pages when working with Yahoo! Smush.it. This alone is a huge timesaver.
  • All rules are backed with extensive documentation and offer explanations for improvement.

Cons of YSlow

  • YSlow only works with remotely hosted webpages. Trying to analyze an HTML document on your desktop will often result in false feedback.
  • Errors in JavaScript or HTML may cause YSlow to hang. This is rare, but a simple close and reopen works just fine.
  • YSlow lacks the ability to add your own rules for testing. I would like to add some personalized rule sets, such as Alexa Ranking or Google Page Rank.
  • Only available for Firefox and requires Firebug to work. If you don’t like Firefox or Firebug, this might be a problem.

Summary

Applications like YSlow offer a quick and effective analysis of web pages. They can generate detailed reports from the information they gather, provide suggestions or tools to resolve issues, and they may end up teaching you something along the way. But YSlow and its alternatives will always have competition: a dedicated, seasoned and qualified web developer or SEO analyst.

Nothing beats knowledge and practice; as we saw, several analysis tools will always come up with several different reports.

There is no one true solution when it comes to search engine optimization or increasing web page load times. However, a helping hand like YSlow may ease your workload and save you or your client a lot of time and, more importantly, money, in the long run.

Carl Walker is CarlWalker on Codecanyon
Tags: seo
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • bpdp

    Free Tip: Never put your social media buttons above your content. A lot of sites do this that should know better… kinda like this one ;)

    Seriously, love your site. hate your page load times.

    • http://www.carlwalker.me Carl Walker
      Author

      Which site are you talking about?
      Envato and my own website have perfectly fine load times.
      If you are refering to my own website and social links, I have placed them at the top because my content is temporary and not important. It’s a placeholder, as it describes. At this time, the links are more important because they are constant.
      Plus both Envato and my site load in acceptable load times.

      Im a little lost as to what your referring to.

      • bpdp

        Carl, sorry for my late reply. your site loads supper speedy for me (but I’m seeing social links at the bottom of your blog posts?). the problem I have is with net.tutsplus. the article header loads. then I have to wait like 15-20 seconds for the tweetthis and facebook scripts to load before any of the article shows up. Drives me crazy, but it does tend to go a little faster once in cache.

        I just generally think it’s a bad practice to place external scripts above your content. if those external sites are down or responding slowly your viewers might back out as I have down a few times in my life. I’d recommend (like my opinion matters) placing them at the bottom of your html then position them where you want with CSS and/or JS.

        Sorry I forgot to mention that I really enjoyed your article. :)

      • http://noxxten.com Dustin

        Carl, your website loads fine for me as well. But I disagree with your comment. Content should always come first in the hierarchy of things. You always read the content before sharing it anyway, so theres no point in loading the sharing tools first and then the content. Unless you can get the sharing tool’s load time down to a second or so on a very slow connection, content should always be first in my opinion.

        And I agree with bpdp. All the tutsplus websites load horribly for me. My connection isn’t great compared to the national average, but its super speedy for my local farming community. I always load the websites in another tab and ignore them until the spinning loading stops. Usually the sidebars load first, then the content. But it takes a full 20 – 30 seconds on an average article to load fully.

      • http://www.carlwalker.me Carl Walker

        @Dustin, thanks for your comment!
        “You always read the content before sharing it anyway, so theres no point in loading the sharing tools first and then the content. ”
        I certainly, 100% agree. I think wires have been crossed. The links on my site aren’t for “sharing” my content with Facebook or sending it to Digg. The links on my site are to more important websites ‘about me’. I’d much rather send people to where they can see my CV, Designs and Contact me than stare at my boring – “this is why my page is rubbish at the moment” placeholder ( which is only temporary anyway ) lol.

        And yes, I get trouble with NetTuts too, which is a huge shame.

  • http://blog.nicolargo.com Nicolargo

    I have written a post on my blog about some technicals points in order to speed up your WordPress blog.

    Post is in french but can be easely translated in English :)

    http://blog.nicolargo.com/2010/09/12-etapes-pour-optimiser-les-performances-de-son-blog-wordpress.html

  • http://www.normansblog.de/ Norman

    YSlow is a great tool, just yesterday I optimized my site after analyzing it with YSlow. Its well integrated in Firebug without causing any problems to Firebug itself. Components view is especially useful to compare before&after optimization.

  • Mike

    Great information for optimizing websites, thank you. I’m fairly new and since you discussed optimizing your site I was wondering that is this whole 7zip for your css and html, how do you set it up and do your traffic/site viewers need winzip or 7zip to view your site? Any help or link to this topic would be greatly appreciated.

    • http://www.webtapmagazine.com Matthew Odette

      Zipping css, html, php and other files is determined by your server’s settings and takes place as a content-encoding header.

      The unzipping is handled by the by the browser and sends the accept-encoding header when it goes to the server to get your sites files. All you need to worry about is if your server is set up to zip files. Any text/script file (css, json, xml, html, php, ect) benefit from being zipped. But images do not, as they are already compressed.

      Check out yahoo’s explanation of zipping for more info.. http://developer.yahoo.com/performance/rules.html#gzip

    • http://www.webtapmagazine.com Matthew Odette

      I forgot to mention. YSlow will show components as 304 (not zipped) if they are being served from your local cache. It’s worth clearing your cache before running tests to see if files are being gzipped.

  • http://aklp.gr AKLP

    lol the irony of the title :D

  • xRommelx

    who don’t lobe FF & Firebug ?

    • xRommelx

      loVe* :)

  • http://www.carlwalker.me Carl Walker

    Hello all,
    Thank you for the comments and reading my first NetTuts+ article.
    I have had some great help from Jeffrey Way along the way and would like to thank him for prepping the article. If you would like to contact me, you can do so via my website or Twitter: @RealCarlWalker

    @xRommelx lol!

  • http://grafisia.com Habieb

    thanks for this great article, time to analyzing and speeding up my site.

  • http://hosting4developers.com Hosting 4 Developers

    A good tip if you want to compress your JavaScript to make your pages load faster is to use Google’s JS compressor: closure-compiler.appspot.com

  • http://www.bransonwerner.com Branson

    I use YSlow so much for web development. I just did a complete site optimization a couple days ago using this.
    Theres a couple sites worth mentioning for helping with css sprites and smush.it:

    http://spriteme.org
    Auto analyzes your site and creates the css and sprite for you.

    http://wordpress.org/extend/plugins/wp-smushit/
    Wordpress Smush.it plugin. Works great (even on my 3.0.1).

    • http://www.carlwalker.me Carl Walker
      Author

      SpriteMe, wow. Very nice feature. Thank you for the addition, it’s going to come in handy!

  • K Arun Mariappan

    Yes. It’s Fav Tools. Thanks for this Article

  • http://www.webdesigncrap.info Gary

    Nice article. I’ve never heard of YSlow before, I must check it out.

  • http://connorcrosby.me Connor Crosby

    I am definitely going to try this on my sites.

    • http://www.carlwalker.me Carl Walker
      Author

      Excellent! I would pair it up with PageSpeed from Google too. You’ll be analysing every website you visit in no time lol.

  • Okeowo Aderemi

    I Concur YSlow is very Good but unfortunately i thinks it’s not compatitble with Firebug Beta Releases because i get yscontext error, Page Speeder from Google is another Good Alternative

  • http://typenights.com Rednights

    If you’re using a wordpress blog, W3C Total Cache can significantly bump up your score. I know I went from a F to a B … though things like the facebook and twitter buttons can destroy scores since that counts as external HTTP requests and have silly 100kb css files attached to them.

  • http://www.fabdesign.com.au Fab

    I use GTMetrix, so I get the result from both Yslow and Page Speed at the same time.

    http://gtmetrix.com/

    • http://www.carlwalker.me Carl Walker
      Author

      Amazing! Thank you, that is a fantastic tool. I wish I had known about it earlier. It’s great that it combines several rule sets from other tools.

      My personal site http://www.carlwalker.me scored 92% ! Excellent.

  • http://crazyhunk.com Crazyhunk

    some really good tools here….
    certainly helps a lot… :)

  • Zsolti

    There is a nice online tool for ranking your page with YSlow and Page Speed (and you can set up daily/weekly monitoring, etc.): http://gtmetrix.com

  • http://jonnyholroyd.freehostingcloud.com Jonny

    Thanks for this post, really quite interesting as I have been wanting to optimize my site. I especially like the Yahoo! Smush.it, looks really useful.

  • http://www.rackaid.com/ Jeff Huckaby

    I’ve seen odd results due to local and proxy caching when using Yslow. If you think your cache settings are correct on the server but still getting odd results in YSlow, turn to other tools to manually check the cache settings. You can also use tools that show you the HTTP headers.

    One I like and use often is:
    http://www.ircache.net/cgi-bin/cacheability.py
    This will tell you the cache settings on various components of the site.

    For compression (gzip), you can check out
    http://www.whatsmyip.org/http_compression/

    Lastly, sometimes you just need to see the full headers:
    http://www.seoconsultants.com/tools/headers

  • http://www.justforthealofit.com/ TheAL

    I use YSlow and PageSpeed. Very helpful.

  • http://www.speedvalue.com Dan

    Pingdom.com is also very good for checking load times and seeing where the bottlenecks are.

  • http://consultorseovalencia.com Carlos

    Yslow is a good tool.

  • http://www.colddesign.it Giacomo Colddesign

    Great article, thanks for sharing..!

  • http://www.crearedesign.co.uk Steve Maggs

    Great first article Carl. I’ve used Yslow before without following through on some recommendations because I didn’t really understand them or didn’t think I had the time to do it properly so this is an ideal summary of what you can do and how.

    GTMetrix sounds great too, I’ll be looking into that.

    • http://www.carlwalker.me Carl Walker
      Author

      Thank you Steve, I’m glad it helped some people out. I had been meaning to write something for a while and YSlow fit that space quite well. I’m overly impressed with GTMetrix, spent about 2 hours with it yesterday improving my placeholder’s score, obessive!
      I also have another article ready to go, which I’ll submit shortly, I hope you like it!

  • http://bit.ly/aWkzkQ dumm

    thanks for tip. i will use immediately for my site.good job

  • What if my web pages are running under IIS? this is all rules for apache

    • http://www.carlwalker.me Carl Walker
      Author

      Under “Grade View”, only some the recommendations which fall under the “Server” category are specific to Apache. Most of the other rules are global, for example: “Minify” or “CDN”. One of the most troublesome rulesets to setup would be “Cache” / “Expires”. It’s worth looking at the manual or forums for your web server to find out how to achieve server specific improvements. YSlow can only provide brief explanations.
      I hope that helps!

  • http://gtmetrix.com/ GT

    I recommend you check out GTMetrix (http://gtmetrix.com/). Excellent if you don’t have ySlow installed, or active all the time.

    • http://www.carlwalker.me Carl Walker
      Author

      Love it! If you could disable rules to check, I’d convert instantly.
      Thank you for your link, reading, commenting and of course your app!

  • http://bit.ly/cLZXGi Julian

    Excellent article. I started using ySlow a few weeks back and I love it.

    Couldn’t help but notice that the http://www.carlwalker.me/ website scored a ‘A’ under v2′s ruleset. :)

    • http://www.carlwalker.me Carl Walker
      Author

      Haha! Nice spot there. Im constantly changing that little placeholder. After finding GTMetrix the other day, I spent even longer with it. Now its 94% and 96% with YSlow and PageSpeed. Its only CDN and Expires headers for external files letting me down.
      Glad you like YSlow and thank you for checking out my article!

  • http://www.aptimize.com armand

    Nice article! Not many designers out there are aware of web performance optimization….

    I highly recommend http://www.webpagetest.org and also Aptimize Site analyzer tool at http://www.aptimize.com to perform benchmark/web performance reports. They are both free and the reports can be easily distributede to your team and colleagues.

    • http://www.carlwalker.me Carl Walker
      Author

      Armand, thank you !
      WebPageTest was included with my article, but at the time only used IE7 Browser mode. They just setup IE9 Beta mode for it, so thank you for reminding me about it.

      I would highly recommend using that tool.

      I’ve never used Aptimize, but I’ll check it out!
      Anyone got any good/bad experiences with it?

  • http://www.kodyaz.com eralper

    Smushing images is simple yet great tool which should be used by designers and programmers to minimize the image load of their pages.
    I use SmushIt frequently which absolutely speeds my web site load time.

    • http://www.carlwalker.me Carl Walker
      Author

      Yes I completely agree. More people should be using optimisation techniques. We could all do with a faster web! lol. I love Smush.it. Very suprised about what Yahoo! have been doing behind the scenes. In my mind they were archaic, but lately I’ve been impressed with their tools.

  • Feehza

    What about URI-Data to minimize HTTP-Rquests?

    • http://www.carlwalker.me Carl Walker
      Author

      To be honest, I’ve never used URI Data effectively, I only ever see it used with JavaScript and thats occasionally. It’s not very popular (that I know of), but if you were really concerned about one HTTP Request in particular, I guess it could work out for you. But then again, why not just host the data locally, inside another ( already requested ) file?

      Maybe someone could help shed some light on this?

  • http://www.imblog.info Muhammad Adnan

    I like this Article and the other info about optimization tools !!

  • http://www.infusionradio.es MundoCaco

    Thanks for this awesome tip! I’ll work on it. ;)

  • http://www.swastiksolutions.in Hiren Khambhayta

    Its much helpful. Before the article had launched I had used it on my website and gained the score of 96/100 and Grade A. (Check proof at http://www.facebook.com/swastiksol )
    Yslow really rocks. The other alternative is google’s pagespeed.

  • http://www.fabiangabor.com Fábián Gábor

    To be honest, I don’t really like YSlow, It gives me some errors that don’t even exist, or are already solved. I have declared FileETag none in my .htaccess file, but YSlow is telling me that my ETags are misconfigured…

    I prefer using Google’s Page Speed to check my website.

  • http://karate-kids.com.au SenseiMattKlein

    This was an extremely helpful post for me. I did not know how to make sense out of many of the items on YSlow until now. Now I have to figure out how to fix them. Thank you.

    • http://www.carlwalker.me Carl Walker
      Author

      I’m glad you liked the article, it was fun to make. I also discovered a few things along the way!
      Due to some of the comments, I also discovered GTMetrix, a fantastic online tool. I’d recommend checking it out too.

      I am considering a dedicated tutorial/e-book on website optimisation for the tutorials marketplace within Envato, if there is enough interest, I’ll make a start.

  • http://alldesignandprint.co.uk Simon Hall

    Best thing web designers could do refuse to use flash, that should help speed things up a little!

    • http://www.carlwalker.me Carl Walker
      Author

      Well said! I understand it’s importance and requirement for specific applications, but in the real world ( and with Canvas ) we now have viable alternatives. Thanks for reading!

  • http://www.securityking.com Craig

    Thanks for the great breakdown of speeding up websites with YSlow, use it a lot with Firebug.

    • http://www.carlwalker.me Carl Walker
      Author

      Thank you for reading, and taking the time to comment!
      I love it, and im very thankful for the comments about GTMetrix too, thats fantastic. Yahoo! are very suprising with their Developer Network, very behind the scenes, which is a shame.

  • Mike Hopley

    One correction:

    You say that Yslow is a tool that does “Analysis of the Document Object Model’s (DOM) performance.” That’s incorrect; Yslow checks web page performance, not DOM performance.

    For example, several of the server rules involve inspecting the HTTP headers (e.g. checking for GZIP). HTTP headers have nothing to do with the DOM, which (loosely speaking) is the interface between javascript and the HTML document.

    If you were looking for some way to put Yslow in a category, you could more accurately describe it as a performance lint tool for web pages.

  • Mike Hopley

    You also need to be careful about advising people to set far-future expires headers. This does help performance a lot, but can easily bite you in the bum later if you don’t understand the maintenance implications.

    If you set a far-future expires header, then you cannot safely update that item without changing the filename (typically with a version or date stamp). Keeping the same name means that users who downloaded the previous version will never get the new one. This can be disastrous, as your site breaks without your realising it.

    In the spirit of the article, here’s my quick performance analysis of this web page. I’m not trying to take a swipe here; my own site also has some of these left unfixed. But this should explain why Nettuts can get slow to load:

    1) Far too many DNS lookups (21). The optimal number is typically 2–4 (when used for domain sharding). Some of these are probably from ads, and some from widgets.

    2) Far too many javascript files (26). Again, some are from ads; but others are just WP plugin javascripts that could be combined.

    3) Similarly: too many CSS files (7). You only need one CSS file for your own CSS; these 7 could be reduced to 2.

    4) Overall page weight is huge: over 2 Mb. Pagetest.org reckons it could save 1 Mb just from optimising your images!

    5) Overall HTTP requests are high: 140 for an empty cache, 129 for a primed cache. A good target would be under 50, although fewer is obviously better. Gravatar images push this figure up.

  • http://www.macromindz.com web design manchester

    The tutorial has been a great inspiration for me . I think it is one of the best ones i have seen . Keep it coming.

  • http://thecustomizewindows.com Abhishek

    Flushing the buffer early is one of the key point to deliver the “feel” of faster loading website.

    More complex the theme architecture, more complicated it will be to speed up. For smaller blogs specially running on a shared server, it is better to use default WP theme with modified CSS and hand written modified php or an optimized Platform.

    It is not possible for all to use a Dedicated or even a VPS + CDN service. Simplistic theme solves the problem.

  • http://www.123montres.com/ Montre Rolex

    Been reading your site for a while now and must say; good writing. Usually I don�t make it through an entire writeup but you have wellwritten and interesting points. Looking forward to more from you.

  • http://twitter.com/yslow YSlow

    Excellent article, however I noticed all YSlow links are pointing to the old and out-of-date website. Yahoo! no longer maintains YSlow, the official YSlow open source project URL is yslow.org

    Thanks,
    @marcelduran — YSlow open source project maintainer

  • jason

    GradeAOverall performance score 100Ruleset applied: YSlow(V2)

    Happy with this performanceURL: http://www.cheapairportparkingbirmingham.com