I know this question has been asked alot of times, however most of them were in 2009-2010.
I am pretty sure a while back a project I was working on removed them, however I cannot find any way to remove them at the moment.
So has there been any advances in this field? It seems crazy that microsoft has made IIS to not be able to easily configure these headers.
Currently have tried:
I hear there is an ISAPI filter you can get to remove them, but I cannot find it anywhere, and have no experience in writing one from scratch but may end up being the only way to do it.
Just so there is some reason why I want to remove Etags for everything. I let the clients cache everything (expires & last-modified) so once my static files are gotten from the server it never needs to query the server again until it expires. As if you use Etags you still need to make a request to the server for each file to find out if the tag still matches. So using the client cache you only make requests for the content you need.
I also have a versioning system in place so when a change happens the static content is then referenced as my.js?12345 rather than my.js?12344. Anyway the point is I currently believe removing Etags will greatly improve one of the bottlenecks on my current project.
To remove the ETag field from the HTTP response header, complete the following steps: Note: Ensure that the rewrite feature is enabled. Expand the Rewrite node in the GUI of the appliance. Type the name for the action in the Name field, in the Create Rewrite Action dialog box.
Open the site which you would like to open and then click on the HTTP Response Headers option. Click on the X-Powered-By header and then click Remove on the Actions Pane to remove it from the response.
In IIS Manager, at the server level, go to the Features view. Click on HTTP Response Headers. You can add/remove headers there. You can also manage the response headers at the site level as well.
You can use the IIS Rewrite Module 2.0 to remove the ETag. The following rewrite rule should do it:
<rewrite> <outboundRules> <rule name="Remove ETag"> <match serverVariable="RESPONSE_ETag" pattern=".+" /> <action type="Rewrite" value="" /> </rule> </outboundRules> </rewrite>
You can see an example image of the rule configuration in IIS Manager on my blog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With