.htaccess - Compression of css is not working in Firefox and Iphone safari -


i using google page speed insights , recommended css pages compressed.so added htaccess

<filesmatch "\.(js|css)$"> header set content-encoding x-deflate # header set content-encoding compress # header set content-encoding x-gzip </filesmatch> 

so compressing css , working fine in chrome , in firefox when access http://fasttorrent.me/cdn/bootstrap.css css link blank , below error

the character encoding of plain text document not declared. document render garbled text in browser configurations if document contains characters outside us-ascii range. character encoding of file needs declared in transfer protocol or file needs use byte order mark encoding signature. 

so added below code

<filesmatch "\.css$"> fileetag none <ifmodule mod_headers.c> header set content-type "text/css" </ifmodule> </filesmatch> 

but still same error in firefox , iphone safari.

edit : tried set charset below..still error

<filesmatch "\.(html|css|js)$"> adddefaultcharset utf-8 defaultlanguage en-us header set content-encoding x-deflate </filesmatch> 

i having similar problem earlier , looks firefox doesn't support following lines because declaring output compressed not compressing it. https://support.mozilla.org/en-us/questions/1063554

<filesmatch "\.(js|css)$"> header set content-encoding x-deflate # header set content-encoding compress # header set content-encoding x-gzip </filesmatch> 

so per link https://varvy.com/pagespeed/enable-compression.html replaced following , seems working.

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 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -