<system.webServer> <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" /> </staticContent> </system.webServer>
There’s a set of file extensions that’s already mapped to staticContent – so IIS only applies this change to all static contents. Also notice that we are caching the content on the client side. This means returning visitors will see a performance boost and we cache it for 7 days on the client side. If you have file extensions that are not part of the standard staticContent extension list, you can easily add it by doing:
<staticContent> <mimeMap fileExtension=".woff" mimeType="font/x-woff" /> </staticContent>
But what about improving performance for first time visitors? There’s a key change you can do to see a significant difference:
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/>
I strongly recommend reading the IIS documentation for urlCompression. Next time I’ll talk about how I used wp-supercache to dramatically improve performance for both first time and returning visitors.