{"id":8150,"date":"2021-07-14T06:20:12","date_gmt":"2021-07-14T06:20:12","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=8150"},"modified":"2021-07-14T11:56:45","modified_gmt":"2021-07-14T11:56:45","slug":"gzip-compression-magento2","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/","title":{"rendered":"Impact of Gzip Compression in Magento 2"},"content":{"rendered":"\n<p><strong><em>Have you ever tried sharing a huge number of files over the internet?<\/em><\/strong> If you had to upload each file, then Speed up your online store performance with various image optimization techniques with <a href=\"https:\/\/store.webkul.com\/magento2-speed-optimization.html\"><strong>Magento 2 Page Speed Optimization Extension. <\/strong><\/a><\/p>\n\n\n\n<p><strong>One of the most utilized e-commerce platforms worldwide is the Magento platform<\/strong>, and we can not ignore its performance optimization also. Success at Magento is of utmost importance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Gzip?<\/h2>\n\n\n\n<p>Gzip is a file compression method that allows your server to provide smaller, faster-loading files to your website visitors. In most cases, using gzip to compress your HTML and CSS files saves between 50-70% of the file size.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How does Gzip Compression works in Magento 2?<\/h2>\n\n\n\n<p>The server is called to provide the requested files whenever a visitor visits the site. If files are larger in size, a higher load time will result. The bigger the file, the longer it takes to show the result. <\/p>\n\n\n\n<p><strong>The key reason is that<\/strong> it reduces the time it takes for a website to download page files and style sheets, which eventually reduces your website&#8217;s load time.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/07\/GZIP.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"477\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/07\/GZIP.jpg\" alt=\"\" class=\"wp-image-9648\" \/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Benefits of Gzip Compression in Magento 2<\/h2>\n\n\n\n<ul><li>Generally, it reduces the time it takes for a website to download page files<\/li><li>And reduces file size up to 70%<\/li><li>In addition, it increases page speed<\/li><li>As a result, enhances the server-side optimization<\/li><li>It allows quick file transfer<\/li><li>In enhancing the website performance<\/li><li>In conclusion, it helps in improving SEO<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to enable Gzip Compression in Magento 2<\/h2>\n\n\n\n<p>There are many ways to enable gzip compression in Magento 2, we are using some of them here: &#8211;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable Gzip on Apache<\/h3>\n\n\n\n<p>One way to enable Gzip compression is to edit your <strong><em>.htaccess file<\/em><\/strong>. Apache is used by most shared hosts, where you can simply further add the code below to your .htaccess file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule mod_deflate.c&gt;\n# Compress HTML, CSS, JavaScript, Text, XML and fonts\nAddOutputFilterByType DEFLATE application\/javascript\nAddOutputFilterByType DEFLATE application\/rss+xml\nAddOutputFilterByType DEFLATE application\/vnd.ms-fontobject\nAddOutputFilterByType DEFLATE application\/x-font\nAddOutputFilterByType DEFLATE application\/x-font-opentype\nAddOutputFilterByType DEFLATE application\/x-font-otf\nAddOutputFilterByType DEFLATE application\/x-font-truetype\nAddOutputFilterByType DEFLATE application\/x-font-ttf\nAddOutputFilterByType DEFLATE application\/x-javascript\nAddOutputFilterByType DEFLATE application\/xhtml+xml\nAddOutputFilterByType DEFLATE application\/xml\nAddOutputFilterByType DEFLATE font\/opentype\nAddOutputFilterByType DEFLATE font\/otf\nAddOutputFilterByType DEFLATE font\/ttf\nAddOutputFilterByType DEFLATE image\/svg+xml\nAddOutputFilterByType DEFLATE image\/x-icon\nAddOutputFilterByType DEFLATE text\/css\nAddOutputFilterByType DEFLATE text\/html\nAddOutputFilterByType DEFLATE text\/javascript\nAddOutputFilterByType DEFLATE text\/plain\nAddOutputFilterByType DEFLATE text\/xml\n\n# Remove browser bugs (only needed for really old browsers)\nBrowserMatch ^Mozilla\/4 gzip-only-text\/html\nBrowserMatch ^Mozilla\/4\\.0&#091;678] no-gzip\nBrowserMatch \\bMSIE !no-gzip !gzip-only-text\/html\nHeader append Vary User-Agent\n&lt;\/IfModule&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Enable Gzip on Nginx<\/h3>\n\n\n\n<p>To enable compression on Nginx, we can use the following code to watch your web server hit new speeds for page serving standards. <strong>Open <em>the file\/etc\/nginx\/nginx.conf<\/em><\/strong>.<\/p>\n\n\n\n<p><strong>Now add the following content: &#8211;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gzip on;\ngzip_vary on;\ngzip_min_length 10240;\ngzip_proxied expired no-cache no-store private auth;\ngzip_types text\/plain text\/css text\/xml text\/javascript application\/x-javascript application\/xml;\ngzip_disable \"MSIE &#091;1-6]\\.\";<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Loading speed has a direct effect on your website\u2019s conversion rate, as a result getting an optimized installation of Magento is vital to the success of your store and even your company in general.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Support?<\/h2>\n\n\n\n<p>Thank You for reading this Blog!<\/p>\n\n\n\n<p>For further more interesting blogs, keep in touch with us. If you need any kind of support, simply raise a ticket at&nbsp;<strong><em><a rel=\"noreferrer noopener\" href=\"https:\/\/webkul.uvdesk.com\/en\/\" target=\"_blank\">https:\/\/webkul.uvdesk.com\/en\/<\/a>.<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>For further help or query, please&nbsp;<a href=\"https:\/\/cloudkul.com\/contact\/\">contact<\/a>&nbsp;us or raise a&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">ticket<\/a>.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever tried sharing a huge number of files over the internet? If you <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2,87,20,341,340],"tags":[424,90,423,114,24,342,100],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Impact of Gzip Compression in Magento 2 - Cloudkul<\/title>\n<meta name=\"description\" content=\"Gzip Compression in Magento 2 is a file compression method that allows your server to provide smaller, faster-loading files to your visitors.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Impact of Gzip Compression in Magento 2 - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"Gzip Compression in Magento 2 is a file compression method that allows your server to provide smaller, faster-loading files to your visitors.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-14T06:20:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-14T11:56:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/07\/GZIP.jpg\" \/>\n<meta name=\"author\" content=\"Tanya Garg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/CloudWebkul\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/\",\"name\":\"Impact of Gzip Compression in Magento 2 - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2021-07-14T06:20:12+00:00\",\"dateModified\":\"2021-07-14T11:56:45+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/65b93d1aa584abd012eb60a25839b984\"},\"description\":\"Gzip Compression in Magento 2 is a file compression method that allows your server to provide smaller, faster-loading files to your visitors.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Impact of Gzip Compression in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/65b93d1aa584abd012eb60a25839b984\",\"name\":\"Tanya Garg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9ea334eba6adf9dfe79873bc0bee8dad?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9ea334eba6adf9dfe79873bc0bee8dad?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Tanya Garg\"},\"description\":\"Business Developer Executive at Webkul\",\"sameAs\":[\"https:\/\/cloudkul.com\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/CloudWebkul\"],\"url\":\"https:\/\/cloudkul.com\/blog\/author\/tanyagarg-bd037\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Impact of Gzip Compression in Magento 2 - Cloudkul","description":"Gzip Compression in Magento 2 is a file compression method that allows your server to provide smaller, faster-loading files to your visitors.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/","og_locale":"en_US","og_type":"article","og_title":"Impact of Gzip Compression in Magento 2 - Cloudkul","og_description":"Gzip Compression in Magento 2 is a file compression method that allows your server to provide smaller, faster-loading files to your visitors.","og_url":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/","og_site_name":"Cloudkul","article_published_time":"2021-07-14T06:20:12+00:00","article_modified_time":"2021-07-14T11:56:45+00:00","og_image":[{"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/07\/GZIP.jpg"}],"author":"Tanya Garg","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/CloudWebkul","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/","url":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/","name":"Impact of Gzip Compression in Magento 2 - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2021-07-14T06:20:12+00:00","dateModified":"2021-07-14T11:56:45+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/65b93d1aa584abd012eb60a25839b984"},"description":"Gzip Compression in Magento 2 is a file compression method that allows your server to provide smaller, faster-loading files to your visitors.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/gzip-compression-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Impact of Gzip Compression in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/65b93d1aa584abd012eb60a25839b984","name":"Tanya Garg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9ea334eba6adf9dfe79873bc0bee8dad?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9ea334eba6adf9dfe79873bc0bee8dad?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Tanya Garg"},"description":"Business Developer Executive at Webkul","sameAs":["https:\/\/cloudkul.com\/","https:\/\/twitter.com\/https:\/\/twitter.com\/CloudWebkul"],"url":"https:\/\/cloudkul.com\/blog\/author\/tanyagarg-bd037\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/8150"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=8150"}],"version-history":[{"count":72,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/8150\/revisions"}],"predecessor-version":[{"id":9705,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/8150\/revisions\/9705"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=8150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=8150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=8150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}