Knowledgebase > Support Center > Knowledgebase

Search help:

How to GZIP Your Site’s Content

Solution GZipping your content is the easiest and best way to speed up your site. For a full discussion about Gzipping content, If you just want the nitty gritty, without the technical explanations, as well as some real world results, let’s jump right into it.

The easiest way to gzip your content, if your site’s server supports it, is to throw one of these lines in your .htaccess file:

# compress all text & html:
AddOutputFilterByType DEFLATE text/html text/plain text/xml

# Or, compress by file extension:
<Files *.html>
SetOutputFilter DEFLATE

Be sure to change the .html to .htm if you use that as your HTML file extension.

Or, if you don’t have access to your site’s .htaccess file, throw this PHP snippet at the top of every page (in WordPress, throw it in your header.php file):

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

After you’ve made the change, your site will be gzipped and your website will be loading faster.

For Further Details, please visit

Beanyhost_com_HTTP_request.jpg Beanyhost_com_HTTP_request.jpg
Beanyhost_com_HTTP_request_compressed.jpg Beanyhost_com_HTTP_request_compressed.jpg

Was this article helpful? yes / no
Article details
Article ID: 30
Date added: 2011-06-30 04:32:43
Views: 1322
Rating (Votes): Article rated 4.0/5.0 (43)

« Go back

2008 - 2018 © | Privacy | TOS | Banners | Hosting | Forums | Blog | SEO | Q&A | Reseller