How to remove Etags

One of my customers wanted to know how he can disable the entity tags in the IIS headers. He wanted to disable it to improve Web browser caching performance. (Ref: https://developer.yahoo.com/performance/rules.html#etags)

For more information on the Etags refer to the following article
MD_ETAG_CHANGENUMBER Metabase Property (IIS 6.0)
https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/ef7f9d58-2a96-4bd8-8ac1-2a67b43284f1.mspx?mfr=true

My customer had tried changing the MD_ETAG_CHANGENUMBER metabase property, but the changes weren’t reflected! But we then noticed that he had four servers over NLB and he hadn’t reflected the changes on all the servers.

Resolution:
=========
There are 2 options which we could try,
1. If we need to have the same ETags over all the servers in NLB, then we need to make MD_ETAG_CHANGENUMBER metabase property unique all over the servers.

2. Removing the ETags is NOT recommended, however you can still do it. You need to write a custom ISAPI which reads the HTTP header, looks for the ETag and deletes it. You can look into this sample ISAPI code that talks about removing ETag. (Please read the disclaimer before implementing it on your servers J)
Removing ETAG header from IIS responses
https://blogs.msdn.com/yanno/archive/2006/03/03/543176.aspx

Or refer to the article for more details, https://turtle.net.nz/blog/post/YSlowUsingIIS/comments [Section 13. Configure ETags] - Again at your own risk!!! J 

Please refer to the following articles for more information,
MD_ETAG_CHANGENUMBER metabase property is not honored in Internet Information Services version 6.0
https://support.microsoft.com/kb/823544

You may experience poor Web performance when you use Internet Explorer 6 to try to access a Web application that is hosted on Internet Information Services 6.0
https://support.microsoft.com/?id=922703

Comments

  • Anonymous
    April 18, 2011
    Hi Akshay, is there an update on this post on how this can be done for IIS 7? I have searched the IIS forums but ultimately your blog seems to be the best answer....however, its for IIS 6 and searches reflect that IIS 7 is a little different.
  • Anonymous
    April 24, 2011
    I haven't got a chance to work on IIS 7, I may visit it in some days