Gzip compression enabled
29 February 2020
As part of the constant improvements being made here at The Dark Fortress, a site-wide compression function has been enabled.
The compression reduces response times by reducing the size of the HTTP response. Gzip is the most popular and effective compression method currently available and generally reduces the response size by about 60-70%.
Because Google now ranks pages on their load times in addition to all the previous criteria, smaller file sizes are once again on the agenda — even in the high speed broadband world we now operate in — for maximising SEO performance. It also helps with page loading onto mobile devices where connection speeds may be restricted.
Behind the scenes bits
This module is activated through the site's .htaccess file. Reduction in file size is impressive with page savings of around 60-65% depending on the size of the original page. For those who are interested and are on Apache servers, the code used is shown below:
You might notice that there is no specific command to deflate php files. That is because php is covered by
AddOutputFilterByType DEFLATE text/htm.
As a point of fact, this page, once gzipped compressed weighs in at a paltry 5.1 KB, a savings: 70.4% from a non-compressed 17.1 KB. Small numbers maybe, but still worth the effort for loading speed.
Gzip compression tested on whatsmyip.org/HTTP Compression Test.
Feel free to use this code in your own .htaccess file, but please note we cannot accept any responsibility if it doesn't work or causes other problems for you. It works for us – but might not for your site.