GZIP Compression is not working properly

0

Hi there

I’m having a few problems enabling gzip compression. This is the error I get:

Gzip is not working properly:

– Your server may not have the “deflate” module enabled (mod_deflate for Apache, ngx_http_gzip_module for NGINX).

– Contact your host. If deflate is enabled, ask why all .htaccess or nginx.conf compression rules are not being applied.

If re-checking and restarting does not resolve, please check with your host or open a support ticket with us.

I emailed Blacknight who host fireblock.ie and got an email saying:

Hi there,

I can confirm GZip compression would be enabled server side for fireblock.ie

You would now need to call the required content in your code to use the GZip compression/tell it what to compress via your coding. You may have seen already but please see the following

https://help.blacknight.com/entries/35604491-GZIP-Compression-Deflate-Linux-Shared-Hosting

You would need to install a caching plugin that is compatible with GZIP compression/mod_deflate to function with dynamic content/urls

So I added the code they suggested to .htaccess:

<IfModule mod_deflate.c>

# Compress HTML, CSS, JavaScript, Text, XML and fonts

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE application/vnd.ms-fontobject

AddOutputFilterByType DEFLATE application/x-font

AddOutputFilterByType DEFLATE application/x-font-opentype

AddOutputFilterByType DEFLATE application/x-font-otf

AddOutputFilterByType DEFLATE application/x-font-truetype

AddOutputFilterByType DEFLATE application/x-font-ttf

AddOutputFilterByType DEFLATE application/x-javascript

AddOutputFilterByType DEFLATE application/xhtml+xml

AddOutputFilterByType DEFLATE application/xml

AddOutputFilterByType DEFLATE font/opentype

AddOutputFilterByType DEFLATE font/otf

AddOutputFilterByType DEFLATE font/ttf

AddOutputFilterByType DEFLATE image/svg+xml

AddOutputFilterByType DEFLATE image/x-icon

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/javascript

AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4.0[678] no-gzip

BrowserMatch bMSIE !no-gzip !gzip-only-text/html

Header append Vary User-Agent

</IfModule>

but nothing changed.

I also added in the code you suggested to .htaccess:

<IfModule mod_deflate.c>

SetOutputFilter DEFLATE

<IfModule mod_setenvif.c>

<IfModule mod_headers.c>

SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)s*,?s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding

RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding

</IfModule>

</IfModule>

<IfModule mod_filter.c>

AddOutputFilterByType DEFLATE “application/atom+xml”

“application/javascript”

“application/json”

“application/ld+json”

“application/manifest+json”

“application/rdf+xml”

“application/rss+xml”

“application/schema+json”

“application/vnd.geo+json”

“application/vnd.ms-fontobject”

“application/x-font-ttf”

“application/x-font-opentype”

“application/x-font-truetype”

“application/x-javascript”

“application/x-web-app-manifest+json”

“application/xhtml+xml”

“application/xml”

“font/eot”

“font/opentype”

“font/otf”

“image/bmp”

“image/svg+xml”

“image/vnd.microsoft.icon”

“image/x-icon”

“text/cache-manifest”

“text/css”

“text/html”

“text/javascript”

“text/plain”

“text/vcard”

“text/vnd.rim.location.xloc”

“text/vtt”

“text/x-component”

“text/x-cross-domain-policy”

“text/xml”

</IfModule>

<IfModule mod_mime.c>

AddEncoding gzip svgz

</IfModule>

</IfModule>

but still nothing.

do you mind taking a look when you have a moment

Thank you!