
How GZIP Compression Enhances Website Performance
- March 11, 2016
- Leave a comment
GZIP compression is one of the most popular methods used to improve your website loading time. It actually reduces your website pages by 70%! In this article, we explore how GZIP compression really reduces the site’s loading time.
The working behind this basically entails that your server will no longer get large requests to entertain. Each page will be reduced to the 10th of its size – the process is highlighted below:
- The browser requests the server for content
- If GZIP is disabled, the page will load slower
- If GZIP is enabled, the server will send “encoded” GZIP content to the browser to read (thus loading the page faster)
There are various methods by which you can enable GZIP compression. You can install different cache plugins which provide GZIP compression by default. Or if you wish to do it manually then you can modify the .htaccess file of your website by simply adding the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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 AddType x-font/otf .otf AddType x-font/ttf .ttf AddType x-font/eot .eot AddType x-font/woff .woff AddType image/x-icon .ico AddType image/png .png |
User Comments