edit Kristina Weis on January 13, 2011
edit Compress content for better SEO
Compressing data means that instead of sending all of a web page's data, file by file, to a web server, you're sending a single, smaller file containing all the data for the page. This makes your website load faster, pleasing both human visitors and search engines. (You do want more visitors coming to your website, don't you?)
Website compression is known by many names, including HTTP compression, gzip compression or deflate.
edit How Does Website Compression Work?
The concept of data compression isn't really complicated. In most files, a few pieces of information are repeated over and over again. Compression works by stating each unique piece of information once, and then referring to it more briefly each time it's repeated. That saves lots of characters, and so makes the file smaller.
Here's what happens behind the scenes when someone goes to a specific URL, or page, on your site:
- Someone sends a request for a web page to a web server.
- The web server requests the content from the server where the page lives, and the page data - text, HTML, etc. - is sent back to the web server.
- The web server then compresses the page data (if it's been configured to do this) and sends it to the person's web browser.
- The web browser un-compresses (or un-gzips) the page data and expands it to display as the page designer intended.
Here's an analogy for thinking about compression. Let's say you want someone across the country to have a bucket full of water. You could mail them a bucket of water, but that would probably be pretty expensive - it would be heavy, and also difficult to ship. Instead, you could pour out the water and just mail the bucket, and your friend could fill it himself.
You've probably already experienced compression - or the lack of it - when someone sends you an email with a big photo, or lots of photos, attached. It can take forever for the huge email to arrive in your Inbox, while you tap your fingers impatiently on your desk. If someone sends you a compressed photo, or group of photos, you won't even notice - the email just arrives.
edit Is Your Website Compressed?
edit How Compression Can Help Your Site
Website compression can help reduce the time it takes for your website's pages to load into someone's web browser - that is, increase your site speed. A faster site delivers a better experience for your customers and other site visitors.
Compression can also make it easier and faster for search engines to crawl your site. That means they can index more pages on your site, so more of your pages can be found by people using search engines.
Bottom line: If you or your visitors notice that your website loads more slowly than most, you really should consider compression.
edit How To Get Your Website Compressed
Check with your hosting company and ask about getting your website compressed or gzipped. It may be easy - even free! - to have them do this for you.
All popular web servers (such as Apache, IIS and nginx) can be configured to compress your website's content automatically before sending it out in response to a request.
edit Website Compression Doesn't Touch Images
Want more? See our article 6 Easy Ways to Improve Your Site Speed for SEO.