Skip to content

Instantly share code, notes, and snippets.

@greggnakamura
Created August 20, 2019 19:49
Show Gist options
  • Save greggnakamura/d8cc9193e2ca887d457725f686a10834 to your computer and use it in GitHub Desktop.
Save greggnakamura/d8cc9193e2ca887d457725f686a10834 to your computer and use it in GitHub Desktop.
web.config: IIS clientCache example
<location path="App_Themes">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
</staticContent>
</system.webServer>
</location>
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="must_revalidate, public" cacheControlMaxAge="365.00:00:00" cacheControlMode="UseMaxAge" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<remove fileExtension=".nupkg" />
<mimeMap fileExtension=".nupkg" mimeType="application/zip, application/octet-stream" />
</staticContent>
</system.webServer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment