Hi, Does anyone know if it is worth disabling ETags on an web application that is hosted on a single web server? Currently we don't make use of ETags in our application.
If it is worth disabling them - why?
Many thanks.
Hi, Does anyone know if it is worth disabling ETags on an web application that is hosted on a single web server? Currently we don't make use of ETags in our application.
If it is worth disabling them - why?
Many thanks.
I don't know if this helps, but you can read about etags here: http://developer.yahoo.net/blog/archives/2007/07/high_performanc_11.html
and here is what Jeff Atwood thinks about ETags:
ETags are a checksum field served up with each server file so the client can tell if the server resource is different from the cached version the client holds locally. Yahoo recommends turning ETags off because they cause problems on server farms due to the way they are generated with machine-specific markers. So unless you run a server farm, you should ignore this guidance. It'll only make your site perform worse because the client will have a more difficult time determining if its cache is stale or fresh. It is possible for the client to use the existing last-modified date fields to determine whether the cache is stale, but last-modified is a weak validator, whereas Entity Tag (ETag) is a strong validator. Why trade strength for weakness?
also interview with Steve Souders at .NET Rocks may help:
Steve Souders: ... the default implementation of IIS and Apache, they put both of those servers, put something in the e-tag that will make it very likely that if the user ever has to check the validity of that resource, the browsers are going to be incorrectly told that the resource is no longer valid. So in Apache’s case, what they put in the e-tag is the INO number of the file on that web server so that if you have more than one web servers hosting your site which most large websites do, that INO number is never going to match across two servers so if yesterday the user went to server one and today they tried to validate that resource and they go to server 2, the e-tag is not going to match, e-tag overrides last modified date so instead of just returning a 200-byte 304 response, the server has to return a 50k response of the entire image.