User Tools

Site Tools


typo3_pagespeed

TYPO3 Pagespeed

Scriptmerger

plugin.tx_scriptmerger {
  css {
    enable = 1
    addContentInDocument = 0
 
    # minification
    minify {
      enable = 1
      ignore = \.min\.
    }
 
    # gzip compression
    compress {
      enable = 1
      ignore = \.gz\.
    }
 
    # merging
    merge {
      enable = 1
      ignore =
    }
  }
 
  javascript {
    enable = 1
    parseBody = 0
    addBeforeBody = 0
    doNotRemoveInDocInBody = 1
    addContentInDocument = 0
 
    # minification
    minify {
      enable = 1
      useJSMinPlus = 0
      ignore = \?,\.min\.,pdmarker\.js,gm\.js,gxmarker1\.js,simpletreemenu\.js,pde\.js,largeoverview\.js
    }
 
    # gzip compression
    compress {
      enable = 1
      ignore = \?,\.gz\.,pdmarker\.js,gm\.js,gxmarker1\.js,simpletreemenu\.js,pde\.js,largeoverview\.js
    }
 
    # merging
    merge {
      enable = 1
      ignore = \?,pdmarker\.js,gm\.js,gxmarker1\.js,simpletreemenu\.js,pde\.js,largeoverview\.js,inDocument-,xajax-
    }
  }
}

.htaccess

### 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} !.*(x-)?gzip.* [NC,OR]
RewriteCond %{HTTP:accept-encoding} .*(x-)?gzip;q=0.* [NC]
RewriteRule ^typo3temp/scriptmerger/compressed/(.+)\.gz\.(js|css) typo3temp/scriptmerger/uncompressed/$1.$2 [L,NC]
 
### END EXT:scriptmerger ###
typo3_pagespeed.txt · Last modified: 2017/10/17 08:05 by admin