Determining which files to compress 

If you are not compressing content with the IBM WAS Edge components or a similar device, consider configuring the IBM HTTP Server to compress certain types of content to improve browser performance


Before you begin

This is an optional configuration. You do not need to perform this procedure if you are compressing content elsewhere in your network. Compression requires a significant amount of CPU; monitor resource availability if you choose to use this option.


About this task

Some versions of Microsoft™ Internet Explorer 6 have issues when dealing with certain compressed content, including images and JavaScript™. The directives below do not compress images, but do compress JavaScript. If you encounter issues with Microsoft Internet Explorer 6 after applying these directives, note that you should uncomment the final line in the directives in Step 5.

When adding directives to the httpd.conf file, be sure to add them in the same order in which they are defined in these steps.

To specify which types of files to compress...


Procedure

  1. Use a text editor, open the httpd.conf file. The file is stored in the following directory by default:

    • AIX : /usr/IBM/HTTPServer/conf

    • Linux™: /opt/IBM/HTTPServer/conf

    • Microsoft Windows™: C:\IBM\HTTPServer\conf

  2. Find the following entry in the configuration file:

      LoadModule deflate_module modules/mod_deflate.so

      If this entry is not present, add it.

  3. If the following line is present in the httpd.conf file, comment it out or remove it. This line will cause all served content to be compressed, which will cause issues with Microsoft Internet Explorer 6:

      #setOutputFilter DEFLATE

  4. Add the following statements to compress multiple content types used by IBM Connections:

      #Only the specified MIME types will be compressed.
       
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE text/plain text/xml
      AddOutputFilterByType DEFLATE application/x-javascript
      AddOutputFilterByType DEFLATE text/css text/javascript
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE application/atom+xml
      AddOutputFilterByType DEFLATE text/javascript

  5. Add the following statement to compress binary content downloaded from Activities to work around a Microsoft Internet Explorer 6 issue with some binary content:

      <Location /activities >
        AddOutputFilterByType DEFLATE application/octet-stream
      </Location>

  6. Add the following statements to specifically indicate that only text/html content should be compressed for older browsers. Uncomment the final line if your environment includes support for Microsoft Internet Explorer 6 SP1 or if you experience web browser hangs or other issues with Microsoft Internet Explorer 6 releases after SP1.

      #Ensure that only text/html content is compressed for older browsers
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0 [678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      # Uncomment the following line if you encounter freezing issues with Internet Explorer 6
      #BrowserMatch \bMSIE\s6.0 gzip-only-text/html 

  7. Add the following statement to specifically indicate that image files and binaries must not be compressed to prevent web browser hangs:

      # Ensures that images and executable binaries are not compressed
      SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png|exe)$ no-gzip dont-vary

  8. Add the following statement to ensure that proxy servers do not modify the User Agent header needed by the above statements:

      # Make sure proxies do not deliver the wrong content
      Header append Vary User-Agent env=!dont-vary

      If the following line is commented out, remove the commenting from it:

      LoadModule headers_module modules/mod_headers.so

  9. Save and close the configuration file.

  10. Restart IBM HTTP Server.


Parent topic

Configure IBM HTTP Server
Previous topic: Add certificates to the WebSphere trust store
Next topic: Update web addresses in IBM HTTP Server


   

 

});