Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Yahoo's YSlow Plug-in Tells You Why Your Site is Slow

Posted by CmdrTaco on Wed Jul 25, 2007 08:25 AM
from the like-i-need-a-plugin-to-tell-me-i-suck dept.
Stoyan writes "Steve Souders, performance architect at Yahoo, announced today the public release of YSlow — a Firefox extension that adds a new panel to Firebug and reports page's performance score in addition to other performance-related features. Here is a review plus helpful tips how to make the scoring system match your needs.
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • /. gets a D (Score:5, Funny)

    by LoadWB (592248) * on Wednesday July 25, @08:28AM (#19982425)
    (http://df0.info/ | Last Journal: Saturday November 10, @02:11AM)
    Interesting utility. Slashdot gets a D on the homepage, F on a comments page. Many media sites score Fs, mostly thanks to numerous ad and cookie sites.
    • Re:/. gets a D (Score:5, Funny)

      by JuanCarlosII (1086993) on Wednesday July 25, @08:30AM (#19982447)
      Even better than that, http://developer.yahoo.com/yslow/ [yahoo.com] gets a D for performance.
      [ Parent ]
      • Re:/. gets a D (Score:5, Interesting)

        by jrumney (197329) on Wednesday July 25, @08:54AM (#19982683)
        (http://jasonrumney.net/)
        My own site also got a 'D', so that seems to be the standard grade. Everything that matters, it got an 'A' for, except for using non-inlined CSS which it got a 'B' for the test that said you shouldn't (to reduce HTTP requests), and an N/A for the test that says you should (to take advantage of caching). Then there were a whole lot of irrelevant things that it got an 'F' for. The fact that none of my site is hosted on a distributed network, the fact that I leave the browser cache to make its own decision about expiring pages since I don't know in advance when I'm going to next change it, and something about ETags, I'm not sure whether it is saying I should have more of them, or I should get rid of the ones I've got.
        [ Parent ]
        • Re:/. gets a D by mazarin5 (Score:2) Wednesday July 25, @11:20AM
          • Re:/. gets a D (Score:4, Interesting)

            by daeg (828071) on Wednesday July 25, @12:17PM (#19985535)
            It depends on the headers (server), browser, and method, actually. Under some circumstances, for instance under SSL, full copies of all files will be downloaded for every request. As HTTP headers get more complex (some browsers with toolbars, etc, plus a plethora of cookies), the HTTP request/response cycle expands. It may not seem like a lot, but a .5kb request header multiplied by dozens of elements and you can quickly use up a lot of bandwidth. Firefox does a much better job than Internet Explorer under SSL, but not by much unless you enable disk-based caching.

            Something I would love to see are some of the headers condensed by the browser and server. For instance, on first request the browser sends the full headers. In the reply headers, the server would set a X-SLIM-REQUEST header with a unique ID that represents that browser configuration's set of optional headers (Accept, Accept-language, Accept-encoding, Accept-charset, User-agent, and other static headers). Further requests from that browser would then simply send the X-SLIM-REQUEST header and unique ID and the server would handle unpacking it -- if the headers are even needed. Servers that don't supply the header would continue to receive full requests, preserving full backward and forward compatibility.

            There are a few things to reduce request sizes for web applications. MOD_ASIS is one of the best ones. We use it as one of the last steps of our deployment process. All images are read in via script, compressed if they are over a certain threshold, and minimal headers are added. Apache then delivers them as-is -- reducing load on Apache as well as the network (the only thing Apache adds is the Server: and Date: lines). ETags and last-modified dates are calculated in advance. Also certain responses such as simple HTTP Moved (Location:) responses, GZip isn't used -- GZiping the response actually *adds* to the size due to their very small document size.
            [ Parent ]
        • Re:/. gets a D by myowntrueself (Score:2) Wednesday July 25, @03:48PM
        • Re:/. gets a D by reed (Score:1) Thursday July 26, @08:39AM
      • 1 reply beneath your current threshold.
    • Re:/. gets a D by MinorFault (Score:2) Wednesday July 25, @09:25AM
    • My site gets a D too by grahamsz (Score:2) Wednesday July 25, @09:59AM
    • Re:/. gets a D by UbuntuDupe (Score:1) Wednesday July 25, @10:24AM
    • Re:/. gets a D by billcopc (Score:1) Wednesday July 25, @07:20PM
  • Sure but (Score:4, Funny)

    by loconet (415875) on Wednesday July 25, @08:29AM (#19982433)
    (http://www.loconet.ca/)
    I bet it doesn't actually tell you your site is being /.ed
  • Another tool (Score:3, Informative)

    by Klaidas (981300) on Wednesday July 25, @08:29AM (#19982437)
    (http://www.klaidas.lt/)
    Web developer [mozilla.org](a must-have) has a speed analyzing tool by default (well, more of a link to a website that does the job), I prefer to use that one. Here's an example [websiteoptimization.com] of slashdot's report.
  • by brunascle (994197) on Wednesday July 25, @08:30AM (#19982451)
    that's all well and good, but it's slow because of the server-side scripts, not anything client side. and no browser plugin will ever know that.
  • nice plugin (Score:1)

    by fearanddread (836731) on Wednesday July 25, @08:33AM (#19982479)
    Saw this demoed at web2.0 This is a very useful plugin. Especially so for developers who may not be familiar with a lot of the reasons sites can load or feel slow.
    • 1 reply beneath your current threshold.
  • by 140Mandak262Jamuna (970587) on Wednesday July 25, @08:35AM (#19982499)
    (Last Journal: Wednesday October 31, @08:33AM)
    The damned article makes a point to say it is an extension to Firebug not Firefox. Whats the difference?
  • Web site optimization for dummies (Score:1, Insightful)

    by Anonymous Coward on Wednesday July 25, @08:35AM (#19982501)
    Nice one Yahoo. Now people can optimize their website without bothering to read up on HTTP and thinking about what they're doing.

    Since 9/10 web developers can't even be bothered using a validator, I predict great success for this tool.
    • Why is this a troll? (Score:5, Insightful)

      by kat_skan (5219) on Wednesday July 25, @11:48AM (#19985077)

      The Anonymous Coward here is spot on. This thing gives awful, awful advice. Some of these in particular I really hated as a dialup user.

      CSS Sprites are the preferred method for reducing the number of image requests. Combine all the images in your page into a single image and use the CSS background-image and background-position properties to display the desired image segment.

      This is only a win if your images are tiny. Why are you optimizing for this? Tiny images do not take long to download, even on dialup, because they are tiny. Frankly I would prefer to have all the site's little icons progressively appear as they become available than have to wait while a single image thirty times the size of any one of them loads. Or, perhaps, fails to load, so that I have to download the whole thing again instead of just the parts I have.

      Inline images use the data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages.

      This is hands down the stupidest idea I have ever heard. Ignoring for the moment that it won't even work for the 70% of your visitors using IE, sending the same image multiple times as base64-encoded text will completely swamp any overhead that would have been introduced by the HTTP headers.

      Combined files are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all stylesheets into a single stylesheet.

      Less egregious than suggesting CSS Sprites, but it still suffers from the same problems. These are not large files, and if they are large files, the headers are not larger.

      As described in Tenni Theurer's blog Browser Cache Usage - Exposed!, 40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience.

      What, seriously? Are you really optimizing for your visitors who load one and only one page before their cache is cleared? Even though you "measured... and found the number of page views with a primed cache is 75-85%"?

      Add an Expires Header

      ...

      Browsers (and proxies) use a cache to reduce the number and size of HTTP requests, making web pages load faster. A web server uses the Expires header in the HTTP response to tell the client how long a component can be cached. This is a far future Expires header, telling the browser that this response won't be stale until April 15, 2010.

      Expires: Thu, 15 Apr 2010 20:00:00 GMT

      ...

      Keep in mind, if you use a far future Expires header you have to change the component's filename whenever the component changes.

      And if you ever change something but forget to change the file name, your visitors will have to reload everything on the damn page to get the current version of the one thing you changed. Assuming, of course, they even realize there should be a newer version than the one they're seeing. And assuming that they actually know how to do that.

      Put CSS at the Top

      While researching performance at Yahoo!, we discovered that moving stylesheets to the document HEAD makes pages load faster. This is because putting stylesheets in the HEAD allows the page to render progressively.

      Um. Duh? link elements are not valid in the body. style elements are

      [ Parent ]
  • Why sites are slow (Score:2, Interesting)

    by Anonymous Coward on Wednesday July 25, @08:37AM (#19982525)
    Sites are only as fast as the slowest path through the site.

    If your site has 10 different affiliate links/sponsors, all hosted on different providers, your site will be slow.

    Similarly, if your site has 100 different java/javascript crapplets,widgets, your site will be even slower.

    Here is a simple guide for site creators:

    1. Don't overload on ads, I'm not going to view them anyway
    2. Put some actual content I'm interested in on your site
    3. Don't overload me with java/javascript crap, I don't care what my mouse pointer looks like, just let me click
    4. Not everything needs a php/mysql front/back end.

    Feel free to use this as a guide, and I might just visit those sites.
  • by jea6 (117959) on Wednesday July 25, @08:56AM (#19982709)
    (Last Journal: Friday October 01 2004, @03:27PM)
    F: You are co-located at 365 Main.
  • hmmm... (Score:5, Insightful)

    by Tom (822) on Wednesday July 25, @08:59AM (#19982741)
    (http://web.lemuria.org/)
    Interesting approach, with lots of flaws.

    For example "use CDN" (aka Akamai, etc.) - yeah, right. For Yahoo.com that's an idea. For my private website, that's bullshit. If they really use this internally to rate sites, their rating sucks by definition.

    So in summary there are a couple good points there, and a couple that are not really appropriate. Expires: Headers are a nice idea for static webpages. But YSlow still gives me an F for not using one on a PHP page that really does change every time you load it.
    • Re:hmmm... by Ant P. (Score:2) Wednesday July 25, @09:07AM
      • Re:hmmm... by Jugalator (Score:2) Wednesday July 25, @09:21AM
    • Re:hmmm... by DavidTC (Score:1) Wednesday July 25, @10:10AM
    • Re:hmmm... by nologin (Score:2) Wednesday July 25, @10:47AM
    • 1 reply beneath your current threshold.
  • Finally, someone tells what web developers have known for years [yahoo.com]: optimizing the site is not a matter of splitting your content into as many images as possible over an enterprise app, but good clean design and code.

    For years, as a web designer, every time I got ready to deploy I encountered some nitwit who would say, "You're going to break up that giant image, aren't you? We can put it on nine servers!" -- creating organizational havoc, a completely unmanageable asset mess of a project, and driving everyone nuts. The Souders-Yahoo approach is different. He suggests the obvious, which is have fewer page elements, stick them into the HTML code if possible, and trim that ragged mess of Java and CSS.

    Also, as a technical writer, I'm impressed whenever someone gets paid to write down the obvious.

  • And yes... (Score:1)

    by thatskinnyguy (1129515) on Wednesday July 25, @09:24AM (#19982991)
    it does run on Linux. :-)
  • Lets you figure out why your site is slow, eh? Cool! Now if only the web developers at Yahoo could use this wonderful tool to learn how to make their script-laden web pages (yes, Yahoo Mail Beta, I'm looking at you) load on my laptop in under 30 seconds. :)
  • Friendlier Reporting (Score:3, Funny)

    by HitekHobo (1132869) on Wednesday July 25, @10:04AM (#19983503)
    (http://hitekhomeless.blogspot.com/)
    I think I'd prefer it to use a bit more realistic reporting. How about: 1) Your web developer is a complete incompetent. 2) Buy more hardware, tightwad. 3) There is no need to add every script plugin you come across. 4) Animated gif's are annoying as well as slow to load. 5) Yes, it does take time to download and render an entire book in html.
  • YSucks - reveals why your site sucks.
    YMe - translates your site into emo-speak.

  • by this great guy (922511) on Wednesday July 25, @11:53AM (#19985167)

    #!/usr/bin/perl -w
    use strict;
    print "You website is slow because: your (average) webmaster/sysadmin/architect cannot " .
    "tell the difference between www.thedailywtf.com and good code\n";
  • by kiick (102190) on Wednesday July 25, @01:05PM (#19986179)
    In my experience "slow" is a very subjective measure of a web site. It really depends on how quickly the content is displayed, not how quickly the entire page is loaded and rendered.

    Lets say you visit, oh, dilbert.com (just to pick on a geeky site) to get your daily dose of dilbert. If the first thing that is rendered on your screen is the actual comic, you don't really care that it takes another 10-20 seconds to display the buttons, menus, sidebars, topbars, bottombars, animations, ads and ads for ads. It can do that while you chuckle over the comic.

    On the other hand, if you have to sit there and drum your fingers while all the other crap loads first before you get to look at todays dilbert, then you are going to be muttering "why is this site so freaking slow?" And if wwww.weselladstoadserversbythebillions.com got it's DNS server taken out by a freak lightning strike, you could be sitting there a while.

    Would it be possible to have a plug-in or extension, so that I could right click on the actual content of a site and say "next time I visit here, load this bit first?" Yes, I could just block everything else on the site, but then they'll change it a week later, and some of the non-content stuff might actually be useful on occasion. I don't want to have to be in an arms race with a million web-monkeys on a thousand different sites just to browse my RDA of surfing.

  • by zerofoo (262795) on Wednesday July 25, @03:08PM (#19987731)
    ...AT&T protection money for your packets.

    -ted
  • Nice utility (Score:2)

    by QuietLagoon (813062) on Wednesday July 25, @04:18PM (#19988601)
    Now, if Yahoo would only use it on their own sites to find out why they are always so darn slow.
  • YSpy? (Score:2)

    by BillGatesLoveChild (1046184) on Wednesday July 25, @06:32PM (#19989883)
    (Last Journal: Thursday August 30, @10:31PM)
    Would you really trust anything that Yahoo puts out? Yahoo has previously ratted on journalists and bloggers to the Chinese Authorities. Worse: They were unapologetic about it, and kept doing it. One Yahoo 'satisfied customer' got ten years jail for criticizing the Government.

    So when Yahoo trundles along offering me neat tracking software, umm, no thanks. There's no telling where you might end up reading about it. Now sure, in the U.S. you don't get locked up for criticizing the government, but things do get leaked or given to the wrong people. Anyone who has ever written a comment that was less that P.R.-worthy should consider that. Yahoo has shown itself to be less than trustworthy.

    http://www.csmonitor.com/2005/0909/p01s03-woap.htm l [csmonitor.com]
    http://www.rsf.org/article.php3?id_article=14884 [rsf.org]
    http://www.nytimes.com/2005/09/12/business/worldbu siness/12search.html?ex=1185508800&en=a0a01819d3ec c0ca&ei=5070 [nytimes.com]
    • ... Re: YSpy? by joe_n_bloe (Score:2) Wednesday July 25, @08:13PM
    • Re:YSpy? by BillGatesLoveChild (Score:2) Wednesday July 25, @10:11PM
    • 1 reply beneath your current threshold.
  • Hopefully this are not the same people at Yahoo that tell he world to send 404 instead of 410 return code for deleted pages [conficio.com]. K<0>
  • Re:first post (Score:1, Funny)

    by Rod Beauvex (832040) on Wednesday July 25, @08:46AM (#19982619)
    Don't you mean Slowverlords? :D
    [ Parent ]
  • Re:website testing (Score:3, Insightful)

    by QuickFox (311231) on Wednesday July 25, @12:00PM (#19985291)

    and that damn Flash is about the worst there is now.
    The Firefox plugin Flashblock [mozilla.org] is quite wonderful. Flash items are replaced with a clickable surface. You get the option to click on the very few Flash items that you do want to view.

    To me, that is the sign of real professional web developers.
    More like a professional organization. If it were up to us developers, pages would be much better than they are.
    [ Parent ]
  • 6 replies beneath your current threshold.