3

I am trying to turn ETag on IIS, without success. I face the same issue both in my local IIS server (version 10) and remote IIS (version 8.5).

I have read many articles (like https://blogs.iis.net/wonyoo/iis-8-0-to-use-or-not-to-use-etag-that-is-the-question) and stackoverflow questions (like IIS 7.5 remove etag headers from response) without any solution so far.

This should be enough in the web.config:

<configuration>
  <system.webServer>
     <staticContent>
       <clientCache setEtag="true" />
     </staticContent>
  </system.webServer>
</configuration>

But it is not setting on Etag, I cannot see in the list of browser's response headers the Etag. Is there something else that needs to be taken in account, in IIS-settings?

Can anyone figure out what should be done?

M.Y.
  • 549
  • 1
  • 3
  • 23
  • 4
    Content type matters. Are you aware that this setting only applies to static content? If you're expecting to have an `ETag` response header for a dynamic content like [tag:asp-classic], it's not gonna happen. – Kul-Tigin Feb 20 '20 at 19:12
  • 1
    I have to humbly admit, that no I was not aware that is only applies to static content. Well, now Etag is sent with response headers. Thank you! – M.Y. Feb 20 '20 at 20:53

0 Answers0