I have run across an IIS/caching problem, and would like any help available
in resolving it.
The scenario is as follows:
1. Windows 2003 server farm running IIS 6.0 ( 4 servers in the farm )
2. We are manually (through IIS - Http Headers tab) adding a "Cache-Control:
Private" header on all images to allow the browser to cache them.
3. IIS automatically adds a "Last-Modified: xxx" header, and a "ETag: xxx"
header to the image response.
The problem is as follows:
The response for an image will sometimes come back as a 200 "OK" and
occasionally a 304 "Not Modified" depending on which server in the farm it
hits. This is because of the etag header that gets returned with the image.
The IIS etag is made up of two parts (xxxxx:yyy), the first part (xxxxx)
being a unique identifier based off of the last modified date, and the second
part (yyy) is some kind of a server identifier based on how many times IIS
has been restarted. If any part of the etag differs from what the browser
has cached, the entire image is again returned from the server (even though
nothing has changed). The etag should be based only on the content/date of
the files themselves, and not have anything to do with the server.
I have found a couple of articles suggesting that Microsoft knows about this.
The following links all discuss this problem:
http://dotnetjunkies.com/WebLog/leon/archive/2005/02/16/54630.asp
http://groups-beta.google.com/group/microsoft.public.inetserver.iis/browse_thread/thread/d8bafa15a91c5654/90083cb60d696b62?q=iis+farm+etag&rnum=1#90083cb60d696b62
http://support.microsoft.com/?scid=kb;en-us;823544&spid=2097&sid=49
One of these links refers to an internal article: SOX020114700100 that
supposedly has a fix to this problem.
There is also supposedly a hot fix available that will patch a flaw in IIS
6.0 related to this problem.
Both of these solutions require opening up a support ticket with Microsoft
to get the internal articles/files.
I was wondering if anyone has come across an easier way to handle this issue?
P.S. There is also a third party ISAPI that addresses this problem...
http://www.isapilabs.com/products/ETagFix/index.htm. Obviously I would
prefer a Microsoft solution if one exists.
Thanks,
S. Erisman