tags:

views:

281

answers:

1

When I run YSlow against my site, I get an "F" on the "Configure ETags" item; it claims that there are no etags for many (all?) of my images, stylesheets, etc.

However, if I run the test on one of those images directly, I get an A on the etag test. Furthermore, on the Firebug Net panel's Response headers I can see the etag on this item for both the full-page and direct-url versions.

Is there something that I might be doing to cause this weird behavior?

(The URLs I'm hitting are here and here if anyone wants to check for themselves. I wouldn't mind a sanity check to see if it's just my browser that's confused.)

+1  A: 

Hi Craig - just tried this locally with FF 3.6 and YSlow 2.0.3 (newly released version) and the standalone image Gives a score of "B", citing misconfigured ETags.

The ETag is showing in the header, bith in the FireBug net panel and in the YSlow components panel.

But, this is by design. If you look at http://developer.yahoo.com/performance/rules.html#etags you will see that the default ETags generated by IIS and Apache are not optimal.

For reference, the actual lint rule in YSlow checks the following two regexes:

  apache_re = new RegExp("^[0-9a-z]+-[0-9a-z]+-[0-9a-z]+$");
  iis_re = new RegExp("^[0-9a-z]+:[0-9a-z]+$");
djch
Even weirder with the "B" score. I'll try upgrading and see what I get. Thanks!
Craig Walker
I think the issue YSlow has is that while the ETags are present, the way that IIS generates them makes them really ineffective and change too often.This means that users will get 200 response codes more often than they should. (The YSlow link does a better job of explaining than me!)
djch