Contact Number

+919501010103

Email Address

contact@oxosolutions.com

Social Icons
OXO Solutions® Logo for Website
Empowering small to large businesses since 2008

Fulfilling all your IT needs at single stop
CIN: U74999PB2016PTC045616​GSTIN: ​​03AACCO3599B1ZO

  • About
    • Mission
    • Vision
    • Our Branding
  • Solutions
  • Services
  • Products
  • Research
    • Web
    • Website Speed Optimization
    • Progressive Web Applications
    • Big Data
    • Artificial Intelligence
    • Internet of Things
    • Web Application Security
  • Portfolio
    • E-Commerce
    • Graphics
    • Logo Design
    • Web Design
    • Web Development
    • SEO
    • Software Development
    • CMS Customization
  • CSR
  • Resources
    • Frequently Asked Questions
  • Happenings
  • Events
  • Support
  • Career
    • Current Openings
    • Apply Online
    • Internship
    • Life at OXO
  • Blog
  • Partners
  • Contact

How to Enable GZIP compression its Importance, and Benefits

How-to-Enable-GZIP-compression-its-Importance-and-Benefits-oxo-solution-digital-marketing-sompany

What is Gzip Compression?

It is a technique to compress and decompress files. It reduces the size of the html, css, and javascript. It is a file format and is enabled on the server side. 

When a user visits your website, the files from the server end are requested by the client’s browser. The server compresses the files and thus reduces the transfer time. On the client’s side the file is first decompressed and then visualized. 

Why Gzip Compression is important?

It is recommended because of the reasons below;

  • Sometimes the file size is reduced to 70%.
  • It increases the page speed.
  • Cost benefit ratio: high

Enable Compression using .htaccess

Compression can be enabled by adding code below to a file named .htaccess on web host/server.  

<ifModule mod_gzip.c>

mod_gzip_on Yes

mod_gzip_dechunk Yes

mod_gzip_item_include file .(html?|txt|css|js|php|pl)$

mod_gzip_item_include handler ^cgi-script$

mod_gzip_item_include mime ^text/.*

mod_gzip_item_include mime ^application/x-javascript.*

mod_gzip_item_exclude mime ^image/.*

mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

</ifModule>

You may also like to read:- Why is HTML Minification Important? How to Minify HTML, CSS?


Enable Compression on Apache Web Servers

If the above does not work try using below code:

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

Enable Compression on NGINX

Add the below code to the config file

gzip on;gzip_comp_level 2;

gzip_http_version 1.0;

gzip_proxied any;

gzip_min_length 1100;

gzip_buffers 16 8k;

gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

# Disable for IE < 6 because there are some known problems

gzip_disable "MSIE [1-6].(?!.*SV1)";

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6

gzip_vary on;

Enable Compression on IIS

If your are using IIS server, we recommend you to check out Microsoft’s guide:

how to enable compression 

Do you find this tutorial useful? If yes, you will certainly love our support. OXO Solution hosting plan includes 24/7 support from our experienced developers. 

Check out our plans.

Post navigation

Previous
Next

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may also Like

  • Saikhom Mirabai Chanu wins first medal for India at Tokyo 2020 Olympics
  • Avoid an Excessive DOM Size: How to Fix this Warning?
  • 14 Steps Guide to Create an Effective SEO Strategy In 2020
  • The Top 25 Do’s and Don’ts of SEO You Need to Know
  • What Are Backlinks in SEO and What Are The Advantages of Backlinks
  • Google Changed Gmail Logo: Here’s What Changed Made So Far?
  • What is Social Media Marketing, and Why Social Media is Important for Business?
  • Combine Images Using CSS Sprites
  • Why Website Speed is Important? How to Optimize Website for Fast Speed?
  • How to Do Keyword Research for SEO

Share on social media

  • Facebook
  • Google Plus
  • LinkedIn
  • twitter
Follow Us

Quick Links

  • Home
  • About
  • Research
  • CSR
  • Resources
  • Happenings
  • Support
  • Career
  • Blog
  • Partners
  • Payment Methods
  • Contact

Services

  • Website Designing
  • Web Development
  • Software Development
  • Ecommerce Development
  • Digital Marketing
  • CMS Customization
  • Search Engine Optimization
  • Logo Design
  • Graphics Design
  • Infrastructure as a Service
  • Workforce as a Service

Solutions

  • Healthcare Solutions
  • Corporate Branding
  • Education Solutions
  • Project Consultancy
  • Digital Marketing
  • Research & Analytics

Products

  • Human Resource Management
  • Customers Support
  • FB Auto
  • Live chat
  • Enterprise Resource Planning

Portfolio

  • E-commerce
  • Logo Design
  • Web Design
  • Web Development
  • SEO
  • Software Development
  • CMS Customization

©2025 OXO Solutions®. All rights reserved.

Copyright Right
  • Privacy Policy
  • Terms and Conditions
  • Refund Policy