Determine which files to compress
If we are not compressing content with the IBM WebSphere Application Server Edge components or a similar device, configure the IHS to compress certain types of content to improve browser performance. This is an optional configuration. We do not need to perform this procedure if we are compressing content elsewhere in the network. Compression requires a significant amount of CPU; we must monitor resource availability if you choose to use this option. The directives discussed here do not compress images, but do compress JavaScript.
To specify which types of files to compress:
- Edit...
/usr/IBM/HTTPServer/conf
... and find the following entry in the configuration file:
LoadModule deflate_module modules/mod_deflate.so
If this entry is not present, add it.
- Add the following statements to compress multiple content types used by IBM Connections:
#Only the specified MIME types will be compressed. AddOutputFilterByType DEFLATE application/atom+xml AddOutputFilterByType DEFLATE application/atomcat+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/json AddOutputFilterByType DEFLATE application/octet-stream AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/xsl
- 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
- Add the following statement to ensure that proxy servers do not modify the User Agent header needed by the previous statements:
# Ensure that 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
- Save and close the configuration file.
- Restart IBM HTTP Server.
Parent topic:
Configure IBM HTTP ServerPrevious topic: Add certificates to the WebSphere trust store
Next topic: Update IBM Connections to use the HTTP server