HTML and CSS Reference
In-Depth Information
Gzip components
Gzip is the most popular compression method. By compressing your files with Gzip,
you can make sure your files get transferred more quickly, even with low bandwidth
connections. Sometimes the savings are as much as 70 percent of file size, making
this a great performance configuration default.
Let us look at how big our files are without our .htaccess Gzip feature in place. To
do this, we simply comment out that section, as shown in the following code snippet:
#<IfModule mod_deflate.c>
#
# # Force deflate for mangled headers
developer.yahoo.com/blogs/ydn/posts/2010/12/
pushing-beyond-gzipping/
# <IfModule mod_setenvif.c>
# <IfModule mod_headers.c>
# SetEnvIfNoCase
^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$
^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$
#HAVE_Accept-Encoding
# RequestHeader append Accept-Encoding
"gzip,deflate" env=HAVE_Accept-Encoding
# </IfModule>
# </IfModule>
#
# # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
# <IfModule filter_module>
# FilterDeclare COMPRESS
# FilterProvider COMPRESS DEFLATE
resp=Content-Type $text/html
# FilterProvider COMPRESS DEFLATE
resp=Content-Type $text/css
# FilterProvider COMPRESS DEFLATE
resp=Content-Type $text/plain
# FilterProvider COMPRESS DEFLATE
resp=Content-Type $text/xml
Search WWH ::




Custom Search