TypePad Connect and rel=”canonical”

Some time ago I created MediaWiki Widget for TypePad Connect:

While editing a wiki page and going to different versions of it, I noticed that Comments widget has a well known issue – it has no idea which comments should be displayed on the page if page has different URLs (ad campaign tracking codes will probably be a main commercial issue, but also editing interfaces in MediaWiki and other CMS softwares and so on) – you can see example of what I’m talking about on these two pages:

which represent the same content page with different URL.

Other frameworks like JS-Kit, for example, solve this problem by allowing to pass URL or ID of the page to the widget, but I just had an idea about new approach to this issue.

The thing is that Google, Yahoo! and Microsoft just announced a new tag in order to fight SEO spam (and I already installed MW extension from Wikia):

<link rel="canonical" href="http://www.mediawikiwidgets.org/TypePad_Connect"/>

The idea is very simple – they just need to know all the pages that legitimately think that they are copies of page X so their smart algorithm that fights page duplication spam will have more clues.

But the side effect is that tools like TypePad Connect or JS-Kit can automatically, on the fly identify the pages they should serve content for. All you need to do is to write a simple jQuery code like this (my first line of jQuery) :

var canonical = $('html:first > head:first > link[rel=canonical]').attr('href');

I think all of us will benefit if widgetized tool providers like TypePad will push for this as solution to the page identity problems.

I hope this will be included into a list of high priority issues and TypePad Connect will get improved first (I actually enjoyed creating widget for it – it was much-much easier then with other vendors).

Google Gadgets on your wiki

Finally, I spent some time researching Google Gadgets implementation
and implemented it successfully as MediaWiki widget: http://www.mediawikiwidgets.org/Google_Gadget

Previously I had some issues with it as there was no control over the
values in the URLs without escaping them, but Gadget wizard didn’t
really allow to easily copy unescaped values for the URL. To avoid
this problem, I added new feature to the Widgets extension to support
validation of parameters without escaping them so to use Google Gadgets widget, you’ll have to upgrade your installation to version 0.8.3: http://www.mediawiki.org/wiki/Extension:Widgets#Download_instructions

This dramatically expands the amount of widgets/gadgets you can install on your wiki – previously there were only Widgetbox widgets getting which required much more hassle and relied on the user account to be created on Widgetbox site which in my view reduced adoption.

So go to Google Gadgets catalog and grab what you like: http://www.google.com/ig/directory?synd=open

As always, help is available at http://groups.google.com/group/mediawiki-widgets or just post your comments here.