I am trying to optimize image, js, and css delivery by enabling gzip compression and setting the client cache policy. The issue is, it doesn't seem like any of the settings are being used. Here is the settings I am trying to use
<caching>
<profiles>
<add extension=".js" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="21.00:00:00"/>
<add extension=".css" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="21.00:00:00"/>
<add extension=".png" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="21.00:00:00"/>
<add extension=".svg" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="21.00:00:00"/>
<add extension=".jpg" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="21.00:00:00"/>
</profiles>
</caching>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"
staticCompressionDisableCpuUsage="95" staticCompressionEnableCpuUsage="60"
dynamicCompressionDisableCpuUsage="95" dynamicCompressionEnableCpuUsage="50">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="9" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="image/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
<add mimeType="application/json" enabled="true" />
<add mimeType="application/json; charset=utf-8" enabled="true" />
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="image/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
<add mimeType="application/json" enabled="true" />
<add mimeType="application/json; charset=utf-8" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>
Client Caching
I have specified 21 days caching for js, css, png, svg, and jpg. When I examine the headers for images stored in the Media Library the expires header is set to 7 days, and anything served from the file system has cache-control set to no-cache. Nothing I do changes this
Compression
NoCSS and JS files are being compressed, but png and svg files are not
What am I missing here? Are there Sitecore settings that might be interfering with IIS?