optimize : enable compression, and expires on non-php content
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 15 Feb 2009 15:27:55 +0000 (15:27 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 15 Feb 2009 15:27:55 +0000 (15:27 +0000)
httpd.conf

index 8536898..2240a7b 100644 (file)
@@ -45,9 +45,17 @@ DirectoryIndex index.php
 </IfModule>
 
 # Reduce the time dynamically generated pages are cache-able.
-<IfModule mod_expires.c>
-  ExpiresByType text/html A1
-</IfModule>
+# note: drupal's botstrap.inc does: header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
+# so forget about optimizing php content
+ExpiresActive On
+<FilesMatch "\.(css|js|png)$">
+ExpiresDefault "access plus 12 hours"
+</FilesMatch>
+
+# Turn on gzip compression
+<FilesMatch "\.(php|js|css)$">
+SetOutputFilter DEFLATE
+</FilesMatch>
 
 # Various rewrite rules.
 <IfModule mod_rewrite.c>