.htaccess - GZIP Compression help. Can't get it to work (2) -


i working on site speed optmization. having problems gzip compression. put code in .htaccess file, upload online , not work. when check tool http://www.gidnetwork.com/tools/gzip-test.php says page content not compressed. check gtmetrix.com , still no luck.

here code put in .htaccess file:

<ifmodule mod_deflate.c>     addoutputfilterbytype deflate text/plain     addoutputfilterbytype deflate text/html     addoutputfilterbytype deflate text/xml     addoutputfilterbytype deflate text/css     addoutputfilterbytype deflate application/xml     addoutputfilterbytype deflate application/xhtml+xml     addoutputfilterbytype deflate application/rss+xml     addoutputfilterbytype deflate application/javascript     addoutputfilterbytype deflate application/x-javascript </ifmodule> 

i tryied without <ifmodule mod_deflate.c></ifmodule>:

addoutputfilterbytype deflate text/plain addoutputfilterbytype deflate text/html addoutputfilterbytype deflate text/xml addoutputfilterbytype deflate text/css addoutputfilterbytype deflate application/xml addoutputfilterbytype deflate application/xhtml+xml addoutputfilterbytype deflate application/rss+xml addoutputfilterbytype deflate application/javascript addoutputfilterbytype deflate application/x-javascript 

also tried method in htaccess:

<files *.html>     setoutputfilter deflate </files> 

still no luck. doing wrong? please if can!

for gzipping behaviour assets, try one.

<filesmatch "\.(html|php|htm|xml|txt|xsl)$">      <ifmodule mod_expires.c>       header set cache-control "max-age=7200, must-revalidate"       header append vary accept-encoding       header append accept-encoding "gzip"      </ifmodule>      </filesmatch> 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -