enable gzip compression by adding instructions in your .htaccess

Notes: enable gzip compression by adding instructions in your .htaccess

This works by adding compression to Apache’s delivery of items. drop this into the bottom of your .htaccess and then see some enhancement of performance. You’ll need to have gzip module enabled in your apache config.

# compress text, html, javascript, css, xml:
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
# Or, compress certain file types by extension:

<files *.html>
SetOutputFilter DEFLATE
</files>

It’s worked for me on a number of WordPress sites so may help with yours. As ever, all risk is your own. Credits: http://www.revealingthestuffs.com/increase-page-speed-score/

Next article

Leverage browser caching