3
votes

I want to enable gzip-compression on my TYPO3 site. It's a shared hoster and I don't have access to the server configuration. This is what I've done so far:

  • uncomment the TYPO3 .htaccess-file (the compression part)

    ### Begin: Compression via TYPO3 ###
    
    <FilesMatch "\.js\.gzip$">
        AddType "text/javascript" .gzip
    </FilesMatch>
    <FilesMatch "\.css\.gzip$">
        AddType "text/css" .gzip
    </FilesMatch>
    
    AddEncoding gzip .gzip
    
    ## End: Compression via TYPO3 ###
    
  • wrote this in my TYPO3 main-template

    config.compressJs = 1
    config.compressCss = 1
    
  • localconf.php:

    $TYPO3_CONF_VARS['BE']['compressionLevel'] = '9'
    $TYPO3_CONF_VARS['FE']['compressionLevel'] = '9'
    

Google Pagespeed still points out, that i should compress my css and js. I don“t know why? Here ist the Site: http://preview-list.lmenges.de/index.php?id=fahrschule

Thx for your help!

1
I had the same probem once, too - unsolved. Unrelated: Have you tried setting compressionLevel to a lower vaue, say 5? I experienced problems once with high values, esp. in the backend. - Mateng

1 Answers

3
votes

Have a look at mod_deflate: http://httpd.apache.org/docs/2.2/mod/mod_deflate.html

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css