---
title: "HTTP Compression | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-editor/it-ops/advanced/http-compression/"
---

# HTTP Compression

> HTTP compression, if accepted by a user browser, can significantly reduce traffic from your server. There are two types of compression offered by IIS: static content compression and dynamic content compression. If the static compression is enabled, then IIS will compress static content and save it to the cache folder. If the dynamic compression is enabled, IIS will compress content each time a client requests it, since the dynamic content is created depending on a client request and because of it changes often.

## Enabling HTTP Compression in IIS

We recommend you to enable both types of compression; you can do this in the following way:

1. Open **Internet Information Services (IIS) Manager**.
2. In the **Connections** pane, select your Customer's Canvas application.

    ![Configuring HTTP compression in Windows Server 2012 and Windows Server 2012 R2.](images/httpCompressionEnable_01.png)

3. In the **Features View** of the application's home page, double-click **Compression** and enable both static and dynamic content compression.

    ![Configuring HTTP compression in Windows Server 2012 and Windows Server 2012 R2.](images/httpCompressionEnable_02.png)

If static or dynamic compression is not installed on your server (the related option is disabled in IIS manager), you can install it like it is described below:

-   [Install HTTP compression in Windows Server 2012 or higher.](#windows-server-2012-and-higher)
-   [Install HTTP compression in Windows 8 or Windows 8.1.](#windows-8-or-windows-81)
-   [Install HTTP compression in Windows Server 2008 or Windows Server 2008 R2.](#windows-server-2008-or-windows-server-2008-r2)
-   [Install HTTP compression in Windows Vista or Windows 7.](#windows-vista-or-windows-7)

## Configuring HTTP Compression

:::note
If a user browser cannot handle compressed content, it will receive uncompressed content, even if compression is enabled on the server side.
:::

You can change all HTTP compression configurations globally for the entire server in the `<httpCompression>` section of your **%Windir%\\system32\\inetsrv\\config\\applicationHost.config** file. This section may look as follows:

```xml
<httpCompression
        directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">

    <scheme name="br" dll="%ProgramFiles%\IIS\IIS Compression\iisbrotli.dll" />
    <scheme name="gzip" dll="%ProgramFiles%\IIS\IIS Compression\iiszlib.dll" />

    <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/wasm" enabled="true" />
        <add mimeType="image/svg+xml" enabled="true" />
        <add mimeType="*/*" enabled="false" />
    </dynamicTypes>

    <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/wasm" enabled="true" />
        <add mimeType="image/svg+xml" enabled="true" />
        <add mimeType="*/*" enabled="false" />
    </staticTypes>

</httpCompression>
```

Here is an overview of some parameters:

-   `directory` specifies the directory where compressed versions of static files are temporarily stored and cached.
-   `scheme` specifies the compression scheme (Gzip or Deflate), where `name` is the name of the scheme and `dll` is the path to the compression library. We strongly recommend you to use GZIP, which is the default scheme.
-   `dynamicTypes` and `staticTypes` sections configure which files should be compressed. If you are going to change the default configuration, take into consideration that some files, like JPG and PNG images, are already compressed, so there is no use to configure the server to compress them.

Since the Design Editor uses TextWhizzJS WebAssembly for the WYSIWYG text engine, compression for the `application/wasm` MIME type is enabled in both dynamic and static sections:

```xml
<add mimeType="application/wasm" enabled="true" />
```

You can verify if compression is working as follows:

1. In Google Chrome, open Dev Tools and load the Design Editor.
2. Click the **Network** tab and select **Use large request** rows.
3. Filter wasm requests and verify that the transferred size of **TextWhizzJS.wasm** is less than the resource size.

![Verifying HTTP compression for WebAssembly.](images/httpCompressionWasm.png)

## Installing HTTP Compression in IIS

### Windows Server 2012 and Higher

1. Run **Server Manager**.
2. In **Server Manager**, click the **Manage** menu, and then click **Add Roles and Features**.
3. In the **Add Roles and Features** wizard, click **Next**. Select the installation type and click **Next**. Select the destination server and click **Next**.
4. On the **Server Roles** page, expand **Web Server (IIS)**, expand **Web Server**, expand **Performance**, and then select **Static Content Compression** and/or **Dynamic Content Compression**. Click **Next**.

    ![Configuring HTTP compression in Windows Server 2019.](images/httpCompression_Setup_WinServer2019.png)

5. On the **Select features** page, click **Next**.
6. On the **Confirm installation selections** page, click **Install**.
7. On the **Results** page, click **Close**.

### Windows 8 or Windows 8.1

1. Open **Control Panel**.
2. In **Control Panel**, click **Programs and Features**, and then click **Turn Windows features on or off**.
3. Expand **Internet Information Services**, expand **World Wide Web Services**, expand **Performance Features**, and then select **Dynamic Content Compression** and/or **Static Content Compression**.

    ![Configuring HTTP compression in Windows 8 and Windows Server 8.1.](images/httpCompression_Setup_Win8.png)

4. Click **OK**.
5. Click **Close**.

### Windows Server 2008 or Windows Server 2008 R2

1. Run **Server Manager**.
2. In the **Server Manager** hierarchy pane, expand **Roles**, and then click **Web Server (IIS)**.
3. In the **Web Server (IIS)** pane, scroll to the **Role Services** section, and then click **Add Role Services**.
4. On the **Select Role Services** page of the **Add Role Services** Wizard, select **Dynamic Content Compression** if you want to install dynamic compression and **Static Content Compression** if you want to install static compression, and then click **Next**.

    ![Configuring HTTP compression in Windows Server 2008 and Windows Server 2008 R2.](images/httpCompression_Setup_WinServer2008.png)

5. On the **Confirm Installation Selections** page, click **Install**.
6. On the **Results** page, click **Close**.

### Windows Vista or Windows 7

1. Open **Control Panel**.
2. In **Control Panel**, click **Programs and Features**, and then click **Turn Windows Features on or off**.
3. Expand **Internet Information Services**, then **World Wide Web Services**, then **Performance Features**.
4. Select **Http Compression Dynamic** if you want to install dynamic compression and **Static Content Compression** if you want to install static compression.

    ![Configuring HTTP compression in Windows Vista and Windows 7.](images/httpCompression_Setup_Win7.png)

5. Click **OK**.
