2010-08-07, 20:03:22
Quote:I activated caching via .htaccess […]
Good move. I put this up on our issue tracker mid July but I haven’t included a .htaccess with caching in any build yet.
How does yours compare to this performance .htaccess, or are you using the same?
My approach is to keep all static files on a CDN, serve only gzipped css and js and use far future expires to get the best caching. Of course i do versioning, so in my teplates i can reference sitescripts_12.js or sitestyle_08.css
this is my actual .htaccess
- - - -
AddDefaultCharset iso-8859-1
RewriteEngine on
ExpiresActive On
ExpiresDefault A60
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header unset Last-Modified
ExpiresDefault A1209600
Header append Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(html|htm|php)$">
ExpiresDefault A1800
Header append Cache-Control "private, proxy-revalidate"
</FilesMatch>
Header unset ETag
FileETag None
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/xhtml+xml
</IfModule>
# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
# RewriteBase www.sitename.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]
- - - -