How to Remove ETags in IIS6

If you’ve used tools like YSlow or WebPageTest you may have noticed that one of the suggestions is to turn off ETags. What are they you ask. An ETag, or entity tag, is an ID assigned to a version of a file by the webserver. This is used to determine whether the version stored in the browser cache is the same as the one on the server.

The Etag is sent with initial download of the file


When checking for modification the etag is sent in the If-None-Match header


So what’s the problem then. The issue lies when hosting a component on multiple servers. When validating the tag on a server different from the one it was downloaded from, the file’s tag can be different as they are generated using server attributes. In IIS 6 the tag is appended with a modification counter, which again is likely to be different from server to server.

So in essence rather than just telling the browser to pull the file from the cache, it will be re-downloaded.

Since last modification is already in place, lets just stick with that. If your not splitting your site across multiple servers you can at least benefit from the reduced header size.

Let’s get to switching the bugger off in IIS 6. Luckily, just as in Apache, it’s really easy.

  1. On the website’s entry right click->properties.
  2. Select the HTTP Headers tab.
  3. Add a new entry with Etag as the name, leaving the value blank.
Ooooh, ultrawide! 😍