We also turn on some caching for common graphics, CSS, javascript…:
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
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
<IfModule mod_expires.c>
# turn on the mod_expires module for this directory
ExpiresActive on
# cache common graphics for 7 days
ExpiresByType image/x-icon "access plus 7 days"
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
# cache CSS for 24 hours
ExpiresByType text/css "access plus 24 hours"
# cache javascript for 1 hour
ExpiresByType application/x-javascript "access plus 1 hour"
# set the default to 24 hours
ExpiresDefault "access plus 24 hours"
Header set Cache-Control "must-revalidate"
</IfModule>
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
SetHandler perl-script
PerlHandler RT::Mason
another one … which programm gives me reliable results to optimize the
rt website … which one do you use … is it necessary to run the program
on the server or it can be run on clients also for realistic conditions.