Page Compression Best Practices for SEO

One of the most underused tools a website owner has at their disposal is that of page compression. When a user clicks on a link, their browser sends a request to the web page at the end of that link. The website then neatly packages the page and sends it through to the user’s browser where it is published to the screen. The larger the page, or rather, the more data and complex code there is on a page, the slower it takes to send and the slower the user’s browser is at publishing that data. That’s where page compression comes to the rescue.

Page compression, as the title suggests, compresses a page. Special algorithms are used to make a page as small as possible (file size that is). A smaller file will obviously fly across the Internet when compared to a larger file, so it makes sense to make that file as small as possible. The most common compression tool available is one called Gzip. This normally comes as standard on websites that are powered by Apache. It’s implementation is also very simple and straightforward – you just edit your .htaccess file to include the correct instructions to compress your website. Your server will then do the rest.

If your website uses Apache, then try adding this code to the .htaccess file. This file is normally hidden on most websites, so you’ll have to view your root directory in full (and be sure to backup that .htaccess file before making any changes). The code you’ll need is:

# Gzip – To compress websites
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/x-javascript text/php

Once you have made any changes and saved the .htaccdess file, check your website. It should load faster. If your website has been corrupted by this code, revert to your old .htaccess file. If everything appears in order, use one of the free page compression verification tools that are available. A recently compressed web page, when checked through, found that each page on the site in question had been compressed by over 65% – that’s a large compression of the data. Page load times were significantly faster, and this should appeal to all readers.

If you have a Windows-based server, then you can switch page compression on through the settings options for your website. You will need to check your hosts help files to complete this task as it changes depending on the version used. It is still only a five minute task. Check your website’s load times first as many hosts (that use Windows) leave compression on as default.

Page load times are now an important ranking factor that search engines rely on when publishing pages in their search results. Since it is a ranking factor, good SEO strategies suggest making use of this tool, more so since it’s free and it only takes a small change to one file. As part of a page compression program, check your graphics to ensure they are also reduced in size, and that CSS and JavaScript are stored externally – they too will be compressed when sent.

A side benefit to using page compression is that the load on your bandwidth is greatly reduced. The trade off is an increase in CPU-load, however, most modern hosts have fast CPUs so this should not be a problem – it’s a trade off well worth the effort. Page compression is one of the easiest ways to gain quicker page load times and well worth the five minutes it takes to make any changes.

Author: admin

Leave a Reply