How do I remove eTag headers from IIS7?

后端 未结 12 2011
旧巷少年郎
旧巷少年郎 2020-12-04 07:28

Per Yahoo\'s best practices for high performance web sites, I\'d like to remove Etags from my headers (I\'m manually managing all my caching and have no need for Etags... an

12条回答
  •  佛祖请我去吃肉
    2020-12-04 08:22

    You would think doing this in the web.config would work to disable ETags in IIS7. But sniffer trace confirms that ETag is sent down anyway.

    
        
            
        
    
    

    Using blank doesn't work, either. ETag is sent down anyway.

    
        
            
        
    
    

    Setting the ETag to blank quotes as other sites have suggested doesn't work.

    
        
            
        
    
    

    Causes even more ETag to be sent down:

    ETag: "8ee1ce1acf18ca1:0",""
    

    In conclusion, nothing I can try or think of works to kill ETag on IIS7, at least without writing custom modules, etc.

提交回复
热议问题