YSLOW ETag and Expired headers errors in ASP.NET MVC Website

914 views Asked by At

When I validate an ASP.NET MVC web site with YSlow I get 2 errors:

  1. Grade F on Configure entity tags (ETags)

    There are 7 components with misconfigured ETags

    The components are static images on a folder.

  2. Grade F on Add Expires headers

    There are 9 static components without a far-future expiration date.

    The components are also static images.

Why do I get these errors? How can I solve this?

Thank You, Miguel

1

There are 1 answers

0
Darren Kopp On

You need to configure IIS to send cache headers. In IIS manager, select a site / application, then you can open the HTTP Response Headers feature and then on the right bar click on Set Common Headers then check Expire Web Content.

Now, I've always put static content on a separate domain, so I'm not sure what happens if you service from your asp.net application, so you can play around with it, but that's where the configuration is in IIS.