Created
August 17, 2018 09:52
-
-
Save d70rr3s/51be6d3fc5647ddbaee84217904f110e to your computer and use it in GitHub Desktop.
GZip configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule deflate_module modules/mod_deflate.so | |
LoadModule filter_module modules/mod_filter.so | |
<IfModule mod_deflate.c> | |
<IfModule mod_filter.c> | |
# Set compression level | |
DeflateCompressionLevel 9 | |
# Compress these named file types | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/x-javascript | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE text/javascript | |
AddOutputFilterByType DEFLATE text/x-js | |
AddOutputFilterByType DEFLATE application/json | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/ecmascript | |
# Handle browser specific compression requirements | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4.0[678] no-gzip | |
BrowserMatch bMSIE !no-gzip !gzip-only-text/html | |
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 | |
</IfModule> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment