[TYPO3-german] typo3 performance

stefan novak lms.brubaker at gmail.com
Fri Jun 15 12:34:41 CEST 2012


meine .htaccess (ohne typo3 standard zeug)

### BEGIN EXT:scriptmerger ###

# Removal of ETag (saves some bytes; the last modified header is still
there)
FileETag MTime Size
<IfModule mod_headers.c>
        FileETag none
</IfModule>

# Client caching of JS/CSS files (because they are merged with an applied
hash!)
# Note: Unsetting of the last modified header causes a permant 200 Ok status
<FilesMatch "\.(merge|min|gz)(\.gz)?\.(js|css)">
        <IfModule mod_expires.c>
                ExpiresActive on
                ExpiresDefault "access plus 1 year"
        </IfModule>

        <IfModule mod_headers.c>
                Header append Cache-Control "public"
        </IfModule>
</FilesMatch>

# deliver the uncompressed file if gzip encoding isn't accepted
AddEncoding x-gzip .gz
RewriteCond %{HTTP:accept-encoding} !gzip [NC]
RewriteRule ^typo3temp/scriptmerger/compressed/(.+)\.gz\.(js|css)
typo3temp/scriptmerger/uncompressed/$1.$2 [L,NC]

# enable expirations
ExpiresActive On
# expire GIF images after a month in the client's cache
ExpiresByType image/png A604800
ExpiresByType image/gif A604800
ExpiresByType image/x-icon A604800
ExpiresByType text/javascript A604800
# HTML documents are good for a week from the
# time they were changed
ExpiresByType text/html M604800

<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary Accept-Encoding
  </FilesMatch>
</IfModule>


More information about the TYPO3-german mailing list