Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # MOD_DEFLATE COMPRESSION
- SetOutputFilter DEFLATE
- AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
- #Pour les navigateurs incompatibles
- BrowserMatch ^Mozilla/4 gzip-only-text/html
- BrowserMatch ^Mozilla/4.0[678] no-gzip
- BrowserMatch bMSIE !no-gzip !gzip-only-text/html
- BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
- #ne pas mettre en cache si ces fichiers le sont déjà
- SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip
- #les proxies doivent donner le bon contenu
- Header append Vary User-Agent env=!dont-vary
- # BEGIN Expire headers
- <IfModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault "access plus 1 year"
- ExpiresByType image/jpg "access plus 1 year"
- ExpiresByType image/jpeg "access plus 1 year"
- ExpiresByType image/png "access plus 1 year"
- ExpiresByType image/gif "access plus 1 year"
- AddType image/x-icon .ico
- ExpiresByType image/ico "access plus 1 year"
- ExpiresByType image/icon "access plus 1 year"
- ExpiresByType image/x-icon "access plus 1 year"
- ExpiresByType text/css "access plus 2592000 seconds"
- ExpiresByType text/javascript "access plus 2592000 seconds"
- ExpiresByType text/html "access plus 7200 seconds"
- ExpiresByType application/xhtml+xml "access plus 7200 seconds"
- ExpiresByType application/javascript A259200
- ExpiresByType application/x-javascript "access plus 2592000 seconds"
- ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
- # Add a far future Expires header for fonts
- AddType application/vnd.ms-fontobject .eot
- AddType application/x-font-ttf .ttf
- AddType application/x-font-opentype .otf
- AddType application/x-font-woff .woff
- AddType image/svg+xml .svg
- ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
- ExpiresByType application/x-font-ttf "access plus 1 year"
- ExpiresByType application/x-font-opentype "access plus 1 year"
- ExpiresByType application/x-font-woff "access plus 1 year"
- ExpiresByType image/svg+xml "access plus 1 year"
- </IfModule>
- # END Expire headers
- # BEGIN Cache-Control Headers
- <IfModule mod_headers.c>
- <FilesMatch "\.(ico|jpe?g|png|gif|swf|gz|ttf)$">
- Header set Cache-Control "max-age=2592000, public"
- </FilesMatch>
- <FilesMatch "\.(css)$">
- Header set Cache-Control "max-age=2592000, public"
- </FilesMatch>
- <FilesMatch "\.(js)$">
- Header set Cache-Control "max-age=2592000, private"
- </FilesMatch>
- <filesMatch "\.(html|htm)$">
- Header set Cache-Control "max-age=7200, public"
- </filesMatch>
- # Disable caching for scripts and other dynamic files
- <FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
- Header unset Cache-Control
- </FilesMatch>
- </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement