Why Google supports GZIP compression for SEO
Does compression matter for good loading speed? If your user keeps waiting for the page to load the user is likely to leave without exploring your website. With the boom of mobile devices, especially in countries with poor internet connectivity, reducing your web page weight is critical for the success with users on mobile.
GZIP is a generic compressor that can be applied to any stream of bytes, compressing your webpages and style sheets before sending them over to the browser. This drastically reduces transfer time since the files are much smaller.
GZIP performs best on text-based content, often achieving compression rates of as high as 70-90% for large files. All modern browsers support and automatically negotiate GZIP compression for all HTTP requests. Your need to ensure that the server is properly configured to serve the compressed resource when requested by the client.
The idea behind using GZIP is to reduce the traffic between web server and browsers.
GZIP is one of the simplest and highest pay off optimizations to implement unfortunately, many people ignore implementing it. Most web servers will compress content on your behalf, and you just need to verify that the server is correctly configured to compress all the content types that would benefit from GZIP compression.
|Library||Size||Compressed size||Compression ratio|
|jquery-1.11.0.js||276 KB||82 KB||70%|
|jquery-1.11.0.min.js||94 KB||33 KB||65%|
|angular-1.2.15.js||729 KB||182 KB||75%|
|angular-1.2.15.min.js||101 KB||37 KB||63%|
|bootstrap-3.1.1.css||118 KB||18 KB||85%|
|bootstrap-3.1.1.min.css||98 KB||17 KB||83%|
|foundation-5.css||186 KB||22 KB||88%|
|foundation-5.min.css||146 KB||18 KB||88%|
How can you add GZIP?
You can add GZIP in two different ways depending on whether or not you’ve got an IIS (Internet Information Services) or Apache server.
If your server is IIS, follow the instructions in the Microsoft TechNet document to enable compression.
For Apache you will need to add the following lines to your .htaccess file:
GZIP compression reduces the bandwidth needed for each request. Although this requires additional CPU time to uncompress the results, it leads to a trade-off with network costs.
You need to avoid using GZIP for image or other binary files. Compressing image file formats supported by the web, as well as videos, PDFs and other binary formats won’t be useful because they already compressed.
For WordPress you can use WordPress Gzip Compression which will speed up your WordPress website drastically and reduce bandwidth usage. This plugin compresses output before it is sent to the user’s browser so the user downloads less data and the browser then processes the compressed data.
Latest posts by Christine (see all)
- How to add an Admin User when WordPress Site is Hacked - January 28, 2018
- How to Manually Update WordPress Plugins using FTP - January 26, 2018
- Why Bluehost is best for WordPress Hosting 2018 - January 11, 2018