57
WEBSPHERE PORTAL V6.1 TUNING GUIDE
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
E N A B L I N G C L I E N T - S I D E C A C H I N G
The HTTP protocol allows the server to tell clients how long they can cache responses.
When the client has the content in their cache, they do not need to request it again, saving
the round-trip time to the server to retrieve the content.
This is done by adding Cache-Control: headers to the content which we wish to make
cacheable. By default, WebSphere Portal will include these headers in the stylesheets it
uses, making that content cacheable at a client for 5 days (432,000 seconds). It is possible
to use mod_headers in IBM HTTP Server to add the same headers to images and
JavaScript files by adding the following lines to httpd.conf:
LoadModule headers_module modules/mod_headers.so
<Location ~ "\.(js|gif|jpg|jpeg|png)$">
Header add Cache-Control "public, max-age=432000, post-
check=172000"
</Location>