Welcome to Geeklog, Anonymous Saturday, July 13 2024 @ 03:14 pm EDT

Other Improvements in Geeklog 1.6.0

  • Monday, June 22 2009 @ 01:50 pm EDT
  • Contributed by:
  • Views: 8,185

Geeklog 1.6.0 brings quite a few obvious improvements (new search, comment improvements, migration support, plugin uploads, XMLSitemap plugin), but also some minor useful changes.

With this article, I'd like to point out two such new features: Support for canonical URLs and output compression.

Canonical URLs

Consider the following URLs:


All of these will take you to a page that effectively contains the same content (this article). These URLs represent duplicate content on a site and that's a bad thing for several reasons: For one, different people may use different URLs when linking to your content and the page rank that you will gain through the linkage will be split up between these different URLs. There's also the risk of being penalized for having too many forms of duplicated content on your site. With the "query" parameter, there is an infinitive amount of possible URLs that would all produce pretty much the same content.

What can be done about this? Geeklog already adds a rel="nofollow" to the links pointing to the printable version of articles and static pages. You could also use a robots.txt or some clever URL redirects to further minimize the damage. But all those would have to be done outside of Geeklog and require additional work for each new article you publish.

Fortunately, the big search engines agreed on a new and much simpler measure: A new meta tag that indicates the so-called canonical URL for a page. When you view the HTML source code for this article, you'll find this line in the <head> section:

<link rel="canonical" href="http://www.geeklog.net/article.php/geeklog-1.6.0-other-new-features">

And you'll find the exact same entry for any of the different URLs for this article as listed above. So this entry tells a search engine that this is the preferred URL for this article and if it ends up here by using a different URL, it should treat it as if it had found it using this canonical URL. Problem solved.

Geeklog 1.6.0 supports canonical URLs in stories, static pages, and the article directory. There is nothing for you to configure - it works "out of the box".

Output Compression

The geeklog.net index page weighs in at about 50KB (give or take a few KB) of HTML. That is 50KB that is being pushed down the line of anyone calling up the Geeklog homepage. It adds to the monthly traffic that the site is causing (which we fortunately don't have to pay for, thanks to our hosting sponsor), it adds to the traffic that any visitor pays their ISP for, and it does of course take its time to get to the visitor's browser, especially if they're on a slow connection. It's not much, but it adds up.

Output compression can help here: Instead of sending the HTML "as is", Geeklog 1.6.0 can now optionally compress it before it's being sent down the line. With the 50KB compressed down to something like 8KB (typically), this can make a difference.

Output compression is disabled by default. To enable it, go to

Configuration > Geeklog > Miscellaneous > Miscellaneous

and set "Send compressed output?" to "True". Geeklog will then start sending compressed output to those browsers that support it.

While this feature should be considered experimental for now, it does seem to work quite well. If you can read this article, then it works, since output compression is enabled on geeklog.net. A potential downside of this option is that it requires slightly more CPU time on both the server and the client side. We haven't seen a significant increase in the CPU load on our server during the 3 weeks it has been in use here, though.

A note to authors of plugins and other add-ons: To use output compression in your plugin, you will need to call the new function COM_output instead of simply echo'ing the HTML. And you need to send the entire content of the page at once! The "Geeklog way" has always been to collect the output in a string variable and send it with a single echo at the end of the script. If your plugin works like that, you can simply replace the echo with COM_output and immediately enjoy the benefits of output compression.