Skip to content

Instantly share code, notes, and snippets.

@suhrab

suhrab/Web.config

Last active Jun 21, 2017
Embed
What would you like to do?
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
You can’t perform that action at this time.