My website is loading large (~3mb) SVG file with jQuery. It takes quite a while therefore I decided to enable gzip compression.
I have a hosting account with Bluehost which supports custom .htaccess files. Here is what I have tried to add to .htaccess file to enable compression without any success (I used Google's Page Speed for testing):
An update to this question, I recently spoke to BlueHost who told me the following:
The way gzip works is that when certain criteria are reached with the server resources, gzip will be enabled and start compressing the sites as needed. Even with the code in the .htaccess file, that's not actually something that you will be able to configure on the account.
But from my findings "as needed" translated to "never". If you really want to GZIP you content (and deliver it quickly) I suggest you look at using Cloudflare as a CDN. Bluehost are a hosting partner of theirs, so it's trivial to set up.
I just added gzip compression via the .htaccess file on Bluehosts's WordPress Hosting. By default, it had the source html/php and CSS files gzipped. Adding this code from BlueHost's WordPress optimization tips article enabled gzip for JS files, images, etc:
Bluehost doesn't offer compressions for .js or .css files (compression only works on .html or .php files) so you will not get that to work on one of their boxes, even with php.ini or .htaccess changes.