Learn/Compression-Can-Speed-Up-Your-Site

By [[User:|]] on

Compress content for better SEO


Compression is a technology that takes the raw text data that make up your website -- elements written in HTML, CSS and JavaScript -- and puts them all into a smaller package for faster loading into a web browser window.

When someone visits or clicks on a link to a large web page - one that's chock full of different files and data - the page can take a long time to load. That's not ideal. People can get impatient and go somewhere else before even seeing the page, and search engines can give preference to faster-loading pages.
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.

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:

Diagram of how web pages reach us through web servers
  1. Someone sends a request for a web page to a web server.
  2. 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.
  3. 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.
  4. 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.

Is Your Website Compressed?


WhatsMyIP.org has a compression test that will tell you if a website is using compression (namely, gzip compression) to speed up its load times.

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.

Compressing your website's content is really your best bet. But if you don't compress your site, it won't usually be a problem unless your website has a lot of data. If you're using a lot of JavaScript, or if you have very long, content-filled pages, then you really do need to compress your site.

Bottom line: If you or your visitors notice that your website loads more slowly than most, you really should consider compression.

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.

Website Compression Doesn't Touch Images


Compression affects only the text of your website (HTML, CSS and JavaScript), and will not help large images load faster. Make sure any image files you use on your site are small enough to let your site load fast. For more information on optimizing your website's images for speed, see this article.


Want more? See our article 6 Easy Ways to Improve Your Site Speed for SEO.


Retrieved from "http://aboutus.com/index.php?title=Learn/Compression-Can-Speed-Up-Your-Site&oldid=27618268"