I have a web site with .css files that I tried to cache for 30 days. However, tools like Fiddler and HTTPWatch indicated that my css files were not being retrieved from the cache in IE7, but they were in Firefox. I finally managed to get the .css files to be pulled from the IE7 browser cache by setting the Last Modified property of the .css header files.
context.Response.Cache.SetLastModified(DateTime.Now); //9/10/2008 – I added this line to SetLastModified to fix what looks like a bug in IE7. IE7 appears to request and receive css files that are cached (200) – even though it should pull them from cache. Worse – they then fail to render. By setting the LastModified (which previously had no value), the CSS now seems to load from cache, and the screen uses them to render, and it does not call back to the server.