Skip to content

Instantly share code, notes, and snippets.

@jmcd
Created September 13, 2013 15:07
Show Gist options
  • Save jmcd/6551950 to your computer and use it in GitHub Desktop.
Save jmcd/6551950 to your computer and use it in GitHub Desktop.
Add dynamic JSON compression to IIS
Install the Compression/DynamicConmpression role with the Server Manager.
Check the httpCompression/dynamicTypes/dynamicTypes element in %windir%\System32\inetsrv\config\applicationhost.config, if application/json is missing, do the following:
%windir%\system32\inetsrv\appcmd set config /section:urlCompression /doDynamicCompression:True /commit:apphost
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json; charset=utf-8',enabled='True']" /commit:apphost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment