Simple Gzip Page Compression

by Techie

One way to rank higher in Google is to get your pages to load faster. Google has confirmed that page load time can affect rankings. In our Google Webmaster Tools we can now see if your sites are fast or slow; if your site is slow, then you might want to take a look at gzip. (And having a site that loads faster will also make your visitors happy).

Gzip is very easy to use and many content management systems have options to enable it. We go over the compression more in this post, but here is an example of how easily you can enable gzip on a PHP page.  All you have to do is copy and paste this code onto a PHP page. (Enabling the compression through an htaccess file is sitewide and it’s even easier.

<? ob_start(“ob_gzhandler”); ?>

{ 1 comment… read it below or add one }

Matthew Winters March 4, 2010 at 1:20 am

I was thinking about that the other day – it will be interesting to see what happens. But even if it doesnt, its a good suggestion that you make. Statistics suggest that the average visitor isnt going to wait for a long time for a page to load, unless he/she really REALLY wants what is on the page (vs. casual surfing, etc.).

That is a helpful bit of code. I would imagine that many open source CMSs and blogging programs have add-ons that help. I happen to do much more with Drupal than WordPress, and there are some great tools to help with performance optimization through compression, caching, etc.

- Matt Winters, Kinaba, WebNewCastle

Reply

Leave a Comment

Previous post:

Next post: