Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width70%

Using Built-In Compression To Compress JSON/JSONP Output From BLADE

Reduce bandwidth consumption for performance improvement in a production environment by optimizing BLADE JSON output through environment enabled gzip.

The following guide will show you how to enable gzip compression for JSON through IIS's built in gzip library.

In a test of the same JSON content, the gzipped version of the result was reduced to only 10.5% of the original content size.

 

Content size without compression (analysis by Fiddler)

Content size with dynamic compression enabled in IIS

 

Enable Dynamic Compression in IIS

Enable dynamic compression in your returned dynamic pages with the following steps

  1. Open the IIS management console
  2. Navigate to the Default website
  3. Click through on the Compression module
  4. Enable compression of dynamic content.

    Info

    If the message "The dynamic content compression module is not installed" appears in IIS when you try to enable it, please see the section below entitled, Installing Dynamic Content Compression

  5. Now open the ApplicationHost.config file located at %WinDir%\System32\inetsrv\config\applicationHost.config
  6. Find the existing urlCompression node and make the following modification to it`s properties

    Code Block
    themeMidnight
    languagexml
    <urlCompression doDynamicCompression="true" />
  7. Still within the applicationHost.config, find the existing httpCompression node and within the dynamicTypes node add the following children nodes.

    	        <add mimeType="application/json" enabled="true" />
    <add mimeType="application/json; charset=utf-8" enabled="true" />

     Your httpCompression node will look like this (extraneous entries removed)

    Code Block
    themeMidnight
    <httpCompression>
    	<staticTypes />
    	<dynamicTypes>        
    		<add mimeType="application/json;" enabled="true" />
    		<add mimeType="application/json; charset=utf-8;" enabled="true" />
    	</dynamicTypes>
    </httpCompression>
  8. Be sure to restart the Application pool for the site you are testing to pick up the changes you have made to the host file

 

Installing Dynamic Content Compression

Info
titleWin Server

If the message "The dynamic content compression module is not installed" appears in IIS when you try to enable it follow these instructions to install on Windows 7

  1. Open server manager
  2. Navigate to Roles > Web Server (IIS)
  3. Within Role Services open Add Role Services
  4. Add the role Web Server > Performance > Dynamic Content Compression


Info
titleWindows 7

If the message "The dynamic content compression module is not installed" appears in IIS when you try to enable it follow these instructions to install on Windows 7

  1. Open Programs and Features
  2. Navigate to Internet Information Services > World Wide Web Services > Performance Features
  3. Enable Dynamic Content Compression

 

Column
width30%
Panel
borderColor#0070b1
bgColor#FFFFFF
borderWidth1

In this section:

Table of Contents
indent15px

Include Page
DASXA:Promos TopDAS
XA:Promos Top

 

Include Page
DASXA:Promos BottomDAS
XA:Promos Bottom