How does IIS HTTP compression handle dynamic types versus static types?

92 Views Asked by At

The sample configuration listed in Microsoft's documentation of the IIS system.webServer/httpCompression configuration setting is as follows:

<httpCompression
      directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
   <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
   <dynamicTypes>
      <add mimeType="text/*" enabled="true" />
      <add mimeType="message/*" enabled="true" />
      <add mimeType="application/javascript" enabled="true" />
      <add mimeType="*/*" enabled="false" />
   </dynamicTypes>
   <staticTypes>
      <add mimeType="text/*" enabled="true" />
      <add mimeType="message/*" enabled="true" />
      <add mimeType="application/javascript" enabled="true" />
      <add mimeType="*/*" enabled="false" />
   </staticTypes>
</httpCompression>

What I'm not understanding is why their list of dynamic and static types are identical. Wouldn't you want a given MIME type to be deterministically registered as either dynamic or static, not both?

In the above example, I can't tell if application/javascript responses will be treated as dynamic or static because it's listed under both settings. Can someone shed some light on how this works?

0

There are 0 best solutions below