K2 Forms Data Compression
KB001883
PRODUCT
Issue
K2 uses the built-in compression of Internet Information Services (IIS) and web browsers to compress content over the Internet, allowing quicker and more responsive user interfaces. Both the packet size issued by the K2 smartforms server and the packet size received by the browser should be compressed. If there are notable differences between these two packet sizes, data compression is probably not configured correctly in IIS or on the proxy servers.
When you render forms over the Internet, data compression might not be configured correctly on the server or on the proxy servers. This can cause different packet sizes in the form on the server and the form accessed over the Internet in the browser.
Enabling data compression company-wide can have side effects on other public websites (particularly for sites using Ajax). You can setup filters on the gateway to check response headers and decide whether to enable compression or not. For reference purposes, see the following resources:
Forefront Threat Management Gateway (TMG)
http://technet.microsoft.com/en-us/library/cc995193.aspx
ISA Server 2006
http://technet.microsoft.com/en-us/library/bb794746.aspx
ISA Server 2004
http://technet.microsoft.com/en-us/library/cc302509.aspx
Resolution
To compress data over the internet, enable the data compression settings on the environment.
The debugging example below uses Google Chrome Developer Tools.
Check if compression is enabled
- Open Google Chrome
- Hit the ‘F12’ button on your keyboard to open the Developer Tools or access it from the Menu
- Run the form in Google Chrome
- Click on the Network tab, then search for the form in the Name column.
- Take note of the values in the Size/Content column of the row linked to the form. These values represent the compressed size of the form over the internet and the actual size (when uncompressed) as shown below:
If there is a big difference in the size of the values, compression in the environment is enabled and working as expected.
Verify if compression was used when the client browser rendered the form
- Click on the form
- Click on the Headers tab
- Expand the Response Headers section and look for items as highlighted below:
If an item such as Content-Encoding is visible, compression was used when the client browser rendered the form.
Size and Content values are more or less the same
When both the Size and Content values are the same or almost the same size, the environment potentially has a compression issue, i.e. compression is not working. To verify that no content compression is applied, follow the steps in the Verify if compression was used when the client rendered the form section. The Content-Encoding item will not be listed. This is typically the case when Microsoft Internet Security and Acceleration Server (ISA) is used. ISA does not allow compression. Contact the system administrator for further assistance as this is an environmental issue.
Another potential cause for content compression not working
Another potential cause for a lack of compressing content could be that the dynamic and static content compression settings are not enabled in Internet Information Services (IIS). Open IIS and click on Compression in the IIS section. Ensure that both the dynamic and static content compression settings are enabled as shown in the image below. Note that the IIS web server role features also need to be installed on the server.