<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_to_Enable_Gzip_Compression</id>
		<title>How to Enable Gzip Compression - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_to_Enable_Gzip_Compression"/>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;action=history"/>
		<updated>2026-06-04T06:17:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;diff=908&amp;oldid=prev</id>
		<title>Brian: /* Enable compression on Apache webservers */</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;diff=908&amp;oldid=prev"/>
				<updated>2017-11-25T17:37:12Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Enable compression on Apache webservers&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:37, 25 November 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE text/xml&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE text/xml&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE text/css&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE text/css&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; AddOutputFilterByType DEFLATE text/javascript&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE application/xml&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE application/xml&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE application/xhtml+xml&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; AddOutputFilterByType DEFLATE application/xhtml+xml&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key briansne_wiki-wiki_:diff:version:1.11a:oldid:907:newid:908 --&gt;
&lt;/table&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;diff=907&amp;oldid=prev</id>
		<title>Brian: /* =How to enable Gzip compression */</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;diff=907&amp;oldid=prev"/>
				<updated>2017-11-25T17:36:35Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;=How to enable Gzip compression&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:36, 25 November 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Enabling gzip compression is a standard practice. If you are not using it for some reason, your webpages are likely slower than your competitors.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Enabling gzip compression is a standard practice. If you are not using it for some reason, your webpages are likely slower than your competitors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===How to enable Gzip compression==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===How to enable Gzip compression&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Compression is enabled via webserver configuration&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Compression is enabled via webserver configuration&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key briansne_wiki-wiki_:diff:version:1.11a:oldid:906:newid:907 --&gt;
&lt;/table&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;diff=906&amp;oldid=prev</id>
		<title>Brian: Created page with &quot;===What is Gzip compression?=== Gzip is a method of compressing files (making them smaller) for faster network transfers. It is also a file format.  Compression allows your we...&quot;</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_Enable_Gzip_Compression&amp;diff=906&amp;oldid=prev"/>
				<updated>2017-11-25T17:36:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;===What is Gzip compression?=== Gzip is a method of compressing files (making them smaller) for faster network transfers. It is also a file format.  Compression allows your we...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===What is Gzip compression?===&lt;br /&gt;
Gzip is a method of compressing files (making them smaller) for faster network transfers.&lt;br /&gt;
It is also a file format.&lt;br /&gt;
&lt;br /&gt;
Compression allows your web server to provide smaller file sizes which load faster for your website users.&lt;br /&gt;
&lt;br /&gt;
Enabling gzip compression is a standard practice. If you are not using it for some reason, your webpages are likely slower than your competitors.&lt;br /&gt;
&lt;br /&gt;
===How to enable Gzip compression==&lt;br /&gt;
Compression is enabled via webserver configuration&lt;br /&gt;
&lt;br /&gt;
Here are the most common ways to enable compression including .htaccess, Apache, Nginx, and Litespeed webservers.&lt;br /&gt;
&lt;br /&gt;
====Enable compression via .htaccess====&lt;br /&gt;
For most people reading this, compression is enabled by adding some code to a file called .htaccess on their web host/server. This means going to the file manager (or wherever you go to add or upload files) on your webhost.&lt;br /&gt;
&lt;br /&gt;
The .htaccess file controls many important things for your site. If you are not familiar with the .htaccess file, please read my working with .htaccess article to get some know how before changing it.&lt;br /&gt;
&lt;br /&gt;
The code below should be added to your .htaccess file...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ifModule mod_gzip.c&amp;gt; &lt;br /&gt;
 mod_gzip_on Yes&lt;br /&gt;
 mod_gzip_dechunk Yes&lt;br /&gt;
 mod_gzip_item_include file .(html?|txt|css|js|php|pl)$&lt;br /&gt;
 mod_gzip_item_include handler ^cgi-script$&lt;br /&gt;
 mod_gzip_item_include mime ^text/.*&lt;br /&gt;
 mod_gzip_item_include mime ^application/x-javascript.*&lt;br /&gt;
 mod_gzip_item_exclude mime ^image/.*&lt;br /&gt;
 mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*&lt;br /&gt;
 &amp;lt;/ifModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the .htaccess file and then refresh your webpage.&lt;br /&gt;
&lt;br /&gt;
====Enable compression on Apache webservers====&lt;br /&gt;
The instructions and code above will work on Apache. If they are not working there is another way that may work for you. If the above code did not seem to work, remove it from your .htaccess file and try this one instead...&lt;br /&gt;
&lt;br /&gt;
 AddOutputFilterByType DEFLATE text/plain&lt;br /&gt;
 AddOutputFilterByType DEFLATE text/html&lt;br /&gt;
 AddOutputFilterByType DEFLATE text/xml&lt;br /&gt;
 AddOutputFilterByType DEFLATE text/css&lt;br /&gt;
 AddOutputFilterByType DEFLATE application/xml&lt;br /&gt;
 AddOutputFilterByType DEFLATE application/xhtml+xml&lt;br /&gt;
 AddOutputFilterByType DEFLATE application/rss+xml&lt;br /&gt;
 AddOutputFilterByType DEFLATE application/javascript&lt;br /&gt;
 AddOutputFilterByType DEFLATE application/x-javascript&lt;br /&gt;
&lt;br /&gt;
====Enable compression on NGINX webservers====&lt;br /&gt;
To enable compression in NGINX you will need to add the following code to your config file&lt;br /&gt;
&lt;br /&gt;
 gzip on;&lt;br /&gt;
 gzip_comp_level 2;&lt;br /&gt;
 gzip_http_version 1.0;&lt;br /&gt;
 gzip_proxied any;&lt;br /&gt;
 gzip_min_length 1100;&lt;br /&gt;
 gzip_buffers 16 8k;&lt;br /&gt;
 gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;&lt;br /&gt;
 &lt;br /&gt;
 # Disable for IE &amp;lt; 6 because there are some known problems&lt;br /&gt;
 gzip_disable &amp;quot;MSIE [1-6].(?!.*SV1)&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 # Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6&lt;br /&gt;
 gzip_vary on;&lt;br /&gt;
&lt;br /&gt;
====Enable compression on Litespeed webservers====&lt;br /&gt;
The ideal way to enable compression in Litespeed is to do it through the configuration under &amp;quot;tuning&amp;quot;. Just go down to &amp;quot;enable compression&amp;quot; and check to see if it is on, if not click &amp;quot;edit&amp;quot; then choose to turn it on. While you are there, look over the several Gzip options that are nearby.&lt;br /&gt;
&lt;br /&gt;
===How effective is gzip compression?===&lt;br /&gt;
Compression of your HTML and CSS files with gzip typically saves around fifty to seventy percent of the file size. This means that it takes less time to load your pages, and less bandwidth is used over all.&lt;/div&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	</feed>