Wednesday, 24 January 2018

How to enable Gzip compression ?

9. Enable Gzip Compression: -
Enable Gzip is a method of compressing files (making them smaller) for faster network transfers. Compression allows your web server to provide smaller file sizes which load faster for your website users. Enablinggzip compression is a standard practice.

Here's a detailed instruction to enable GZIP compression in the .htaccess file: -

1. Click My Account at the top of this page.
2. Select Hosting Manager from the drop-down menu.
3. Enter your username and password, and click Log In.
4. On the Home page, click the Files icon or the [ v ] arrow symbol on its right side.
5. Click on the File Manager icon next to Directory Privacy.
6. In the pop-up box, make sure to choose Web Root and tick the box that says Show Hidden files (dot files).
7. Click Go.
8. Right-click on the .htaccess file, select Edit.
9. A code editor popup will display, click Edit.
10. Add one of the following scripts inside the .htaccess file.


Using Gzip in Conjunction with a CDN: -
Almost all Content Delivery Networks (CDNs) provide automated file compression with gzip. This relieves you of the need to verify that compression is indeed taking place.

Additionally, CDNs typically support a number of front-end optimization techniques that can be used in conjunction with gzip to further shrink outgoing file size.

These include minification, an optimization process in which elements such as white spaces and repeated variable names are trimmed from a file’s code, potentially reducing its size by half before compression. Most CDNs automatically minify much of a site’s content on-the-fly, including all JavaScript, HTML and CSS.

While minification before gzipping a file might seem redundant, it’s been shown to shrink tarfile size by an additional 5-10%. Because CDNs perform both minification and gzip compression, they minimize the size of the code files delivered to your users, significantly reducing page load time.
Post a Comment