Monday, August 10, 2009

Enable GZIP compression on HTTP server to improve response time



Problem
You experience slow responses when accessing Lotus® Quickr™ services for WebSphere® Portal on a remote network or over a slow network connection (for example, DSL, Cable Modem).

Resolving the problem
Enabling GZIP compression on the HTTP Server serving Lotus Quickr resources reduces the amount of content that has to be downloaded and improves response times. To do so, use these steps:
1. Stop the Apache server (on your Web Server)

2. Edit the httpd.conf file

3. Append the following to the end of the file:

# compress everything but images
LoadModule deflate_module modules/mod_deflate.so
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio

# log some info
#LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
#CustomLog logs/deflate_log deflate

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|exe)$ no-gzip dont-vary

4. Save the file

5. Restart the Apache server