Skip to content

Instantly share code, notes, and snippets.

@VladoMS
Forked from suhrab/Web.config
Created June 21, 2017 12:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladoMS/888680c152d94ea6f3f651aab7ed5894 to your computer and use it in GitHub Desktop.
Save VladoMS/888680c152d94ea6f3f651aab7ed5894 to your computer and use it in GitHub Desktop.
IIS serve pre-compressed static gzip files
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseExpires" httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" />
<mimeMap fileExtension=".js.gz" mimeType="application/javascript" />
</staticContent>
</system.webServer>
<location path="gz">
<system.webServer>
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
<httpProtocol>
<customHeaders>
<add name="content-encoding" value="gzip" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment