change/enhance the mod_deflate part in .htaccessü
-
Hi Emre,
First of all thank you for your great plugin!!! ??
I have noticed that when I use the Gzip feature it does not compress everything. For example my site contains some ttf fonts which are not getting compressed.
At the moment your plugin puts the following code to .htaccess:
# BEGIN GzipWpFastestCache
<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>
# END GzipWpFastestCacheWhen I use this my ttf-s are not compressed. If I change your code to a code I found on Stack Overflow (https://stackoverflow.com/questions/14005758/gzip-compression-htaccess-deflate):
# ———————————————————————–
# Defining MIME types to ensure the web server actually knows about them.
# ———————————————————————–
<IfModule mod_mime.c>
AddType application/javascript js
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</Ifmodule>
# ———————————————————————–
# Compressing output.
# ———————————————————————–
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</Ifmodule>Then everything gets properly compressed.
Do you think you could maybe change the code so this is taken into consideration?
Thanks a lot, and keep up the good work! Your plugin is awesome! ??
Jambo
- The topic ‘change/enhance the mod_deflate part in .htaccessü’ is closed to new replies.