4 Enable IIS HTTP Compression

Enable IIS HTTP Compression on a Windows Server 2012 R2 Standard when the pipeline between the Web Server and the IIS Client have low bandwidth or have high amounts of data usage.

4.1 IIS Web Page Compression

4.1.1 HTTP Compression

By default, HTTP compression is disabled in Windows Server 2012 R2 Standard but can be enabled as necessary. Enable the compression, when:

  • The bandwidth between the IIS Web Server and the IE Client(s) is of a low speed.

  • The bandwidth between the IIS Web Server and the IE Client(s) is high speed but has high utilization.

  • Reducing overall traffic between the IIS Web Server and the IE Client(s).

4.1.2 Known Effects of Enabling Compression

Enabling IIS Compression increases CPU usage on the Web Server.

Every time a non-static page (ASP, ASPX) is requested, the page is compressed on the fly before sending to the client. This puts some overhead on the Web Server CPU, however, based on internal testing web server load is usually very minimum.

Static pages such as HTML, JS, and HTM are compressed only once, and then stored in a cache on the Web Server for later requests.

To keep the performance steady, the Web Servers should be monitored frequently to prevent occurrence of a CPU bottleneck.

4.1.3 Enable HTTP Compression

  1. Go to Control Panel > Administrator Tools > Internet Information Services (IIS) manager.

  2. Browse to the Argus Safety Web website.

  3. In the Features View, double-click Compression.

  4. Check both options:

    • Enable dynamic content compression

    • Enable static content compression

      Note:

      To enable compression, the feature option must be installed as part of the Windows installation.

4.2 IIS Caching Settings

4.2.1 IIS Caching

IIS Caching is supported in Windows Server 2012 R2 Standard.

To prevent the web server from having to re-serve certain files to the IE Client when the file has not changed, use IIS Caching. For example, files like Images do not change on a day-to-day basis and should not be sent again each time the client requests the file. The local IE client should keep a local cache copy of the file and use the local file instead.

To make sure that IIS Caching functions properly:

  • Set up the IIS

  • Set up the local IE client settings correctly

4.2.2 Known Effects of Enabling Caching

Currently, there are no known effects of enabling caching on the Web Server.

However, enabling cache should only be used on files and folders where the files are not dynamic or do not change daily. Certain files, such as .ASP and .ASPX files, should never be cached.

4.2.3 Enable Caching

  1. Go to Control Panel > Administrator Tools > Internet Information Services (IIS) manager.

  2. Browse to the Argus Safety Web website.

  3. Double-click the HTTP Response Headers.

    Make sure that Cache Control header with value of no-cache exists.

  4. Click Set Common Headers.

    Make sure that Expire Web Content is checked and the option Immediately is selected.

  5. Apply the changes.

  6. Click the PDFReports folder.

  7. Double-click the HTTP Response Headers.

    Make sure that Cache Control header does not exist.

  8. Click Set Common Headers.

    Make sure that Expire Web Content is unchecked.

  9. Repeat the same steps for UploadedLetters (Steps 6-10).

  10. Make sure that on the Set Common Headers, the After option is checked, and configured for the specified number of days as seen next to each folder below:

    • Css—15 Days Expiration

    • Js—1 Day Expiration

    • Img—15 Days Expiration

4.3 Local Internet Explorer (IE) Client Caching Settings

4.3.1 IE Client Caching

IE Caching works directly with IIS Caching. If IIS Caching is used, you must turn on IE Client Caching otherwise caching will not occur.

4.3.2 IE Client Caching—Tab Options

Option Description
Every Time I visit the Web Page No file is cached. Every time a file is requested, IE will request the Server to re-send all files.

This option should never be used as performance will suffer severely.

Every Time I Start Internet Explorer Cache files only until the browser is closed. Upon closing the IE window, all cache will be expired.

This option will provide some performance enhancement when a user visits the same page multiple times within a single browser session.

Automatically Allows IE to make a decision if a file should be cached or not.

This option automatically performs the same function as "Every Time I Start Internet Explorer". In addition, after a file has been requested multiple times, IE will automatically cache the file even after the browser is closed. If the file has been cached and a new version of the file exists on the Web Server, the new version will be downloaded to the client.

This option should be used for best performance.

Never IE will always cache every file which can cause problem with sites that have dynamic data, and should not be used.

Besides, if a file has been updated on the server due to an upgrade, the new file will not be sent to the client.


4.3.3 Enable IE Caching

  1. In Internet Explorer, select Tools > Internet Options.

  2. Select the General Tab, locate the Browsing history section and click Settings.

  3. In the Temporary Internet Files and History Settings dialog box, select Automatically and click OK.

  4. Close the Internet Explorer browser and restart it to begin caching.