Gzip compression - file format and software application used in Unix

Get FREE Premium WordPress Blog Theme

Download Now
MinoPress Logo
  • Home
  • Products
      • Azi Theme - $24
        Azi Theme - $24Multipurpose Woocommerce Theme
      • Muskan <br> $19
        Muskan
        $19
        Multipurpose Woocommerce Theme
      • AAnglo - FREE
        AAnglo - FREELifestyle Blog WordPress Theme
      • Jusako - $19
        Jusako - $19eCommerce HTML5 Template
      View all products
    • Muskan Theme
    • Azedw Theme
    • Aanglo Theme
    • Jusako Template
  • Services
    • WordPress theme Customization
    • WordPress theme installation
    • Custom WP plugin development
    • Convert HTML to WP Theme
    • Convert PSD to WP Theme
    • Custom website design with Figma / Sktch / Xd
    • Convert psd / Figma / Sktch / Xd to html
    • View all services
  • Pricing
  • Blog
    • eCommerce
    • JavaScript
    • Maintenance And Code
    • Review
    • Security
    • Server
    • Snippets
    • SEO And Digital Marketing
    • Speed And Performance
    • Tutorial
    • User Experience
    • WordPress
    • All Articles
  • About
  • Support
    • Documentation
    • Create Ticket
    • Contact Us

Search

No products in the cart.

What is Gzip compression on websites

Speed And Performance Server

  • By: mino-press
  • January 25, 2022
Gzip compression

What is Gzip compression

Gzip is a file format and software application used in Unix systems to compress HTTP content before it is delivered to the client.

The process is known to compress a file by up to 80 percent, which improves page load time, and reduces bandwidth consumption.

The file types associated with gzip include:

  • .gz – Specifies a file extension compressed by the gzip algorithm.
  • tar file, tarball – A format used to store multiple files for archiving, but not for compression. and Gzip can be used to compress .tar files.
  • .tgz, .tar.gz, .gz file – Specifies a .tar file compressed by gzip.
Table Of Contents
show
  • What is Gzip compression
  • Run the Gzip command
  • WordPress
  • Enabling GZIP on the Apache server
  • Enabling GZIP on an NGINX server
  • Gzip Activation Verification
  • Using Gzip compression in conjunction with CDN

Run the Gzip command

Gzip can be applied on a number of different platforms, including those listed below:

WordPress

You can run gzip in WordPress using a cache plugin that supports gzip, or by running gzip on your web server using a .htaccess file.

Enabling GZIP on the Apache server

To enable gzip on an Apache web server, add the gzip compression commands within

mod_deflate

The module is at the end of the .htaccess file.

for example:

<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 
</IfModule>

Enabling GZIP on an NGINX server

To enable gzip in NGINX, add the following code to the Nginx.conf file:

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_vary on;
gzip_types text/plain text/css text/javascript image/svg+xml image/x-icon application/javascript application/x-javascript;

Gzip Activation Verification

After running gzip, the next step is to make sure it compresses the outgoing files from your site. This is done by checking HTTP requests in the browser.

For example, by logging in to the Network in the Headers tab, from there you should get to the Content-Encoding header.

Gzip Activation Verification

In response, gzip should appear in the Headers in the expression Content-Encoding:

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 21 Jul 2014 01:12:36 GMT
Content-Type: text/html; charset=UTF-8…
Vary: Accept-Encoding
Content-Encoding: gzip

Using Gzip compression in conjunction with CDN

Now we know What is Gzip compression, I explain how to conjunction Gzip and CDN.

Almost all content transfer networks (CDNs) provide automatic file compression with gzip. This alleviates the need to verify that compression does take place.

Besides, CDNs support many site-speed optimization techniques. That can used in conjunction with gzip to further reduce the output file size.

These include minimization, an optimization process in which components. Such as white spaces and recurring variable names cut from the source file code. Which can reduce the file size by half before compression.

Above all Most CDNs automatically perform minify compression, including JavaScript, HTML, and CSS files.

Although minify compression may seem redundant, it has been shown to reduce the junk file size by an additional 5-10%.

Because CDN performs both minify and gzip compression, they minimize the size of the code files transmitted to your users, significantly reducing page load time.

  • twitter
  • facebook
  • WhatsApp
  • Google+
  • Pinterest
  • LinkedIn
  • Buffer

Previous Post

Woocommerce attach image to order – simple snippet

Next Post

What is Woocommerce?

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest
guest
0 Comments
Inline Feedbacks
View all comments

Search


Recent post

Digital Marketing Glossary
March 8, 2022

Digital Marketing Glossary

async and await in JavaScript example
November 25, 2021

async and await in JavaScript example

16 types of WordPress websites
December 21, 2021

16 types of WordPress websites

how to optimize images for WordPress
November 24, 2021

how to optimize images for WordPress

How to Safely Enable SVG Support in WordPress
April 3, 2022

How to Safely Enable SVG Support in WordPress

Catetories

  • category image Server
  • category image General
  • category image WordPress
  • category image Review
  • category image Tutorial
  • category image JavaScript
  • category image Security
  • category image eCommerce
  • category image Maintenance And Code
  • category image Speed And Performance
  • category image User Experience
  • category image SEO And Digital Marketing
  • category image Snippets

Tags

  • optimization
  • compression
  • Glossary
  • promoting
  • snippet
  • hosting
  • CSS
  • CDN
  • archive
  • Content
  • UI
  • blogging
  • Shopify
  • SEO
  • UX
  • Review
  • WordPress
  • Tips
  • User Interface
  • Elementor
  • how to
  • wordpress security headers
  • User Experience
  • Gutenberg
  • image optimization
  • wordpress security
  • Domain
  • SVG
  • code example
  • Digital Marketing
  • domain name
  • javascript
  • Speed
  • 301
  • Woocommerce
  • Improving
  • 302
  • Security
  • plugin
  • redirect
  • Guide
  • Plugins
  • PHP
  • localStorage
  • colors
  • hook
  • Dark Mode
  • psychology
  • filter
  • Mistakes
  • gzip
  • action

Newsletter signup

Subscribe to the MinoPress newsletter to get the latest news Tutorial and guides, premium and free theme releases, updates, promotions, and more!

Please wait...

Thank you for sign up!

Logo footer logo

Our goal is to make life easy for web developers in the most optimal way, with modern and contemporary designs, (even without knowledge of code writing to succeed in creating amazing websites). Our motto is quality above all

Follow us:
  • FB
  • YU
  • LI

Contact info

  • Email: admin@minopress.com
  • Submit Ticket: Support


  • My account
  • Documentation
  • MinoPress FAQ

© 2021 WP Studio , All Rights Reserved

payment methods
  • Contact Us
  • Support
  • Terms and Conditions
  • Refund and Returns Policy

This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Read more

PREMIUM WORDPRESS THEMES & SERVICES Dismiss

wpDiscuz