There is some discussion going on about the length of URL's. URL shorteners came into vogue again thanks to Twitter. Many people encode URL's in Twitter message in order to save space. (I do as well)
Dave Winer comes with a solution. He suggest that all services should encorparate shortened URL's. And Seesmic showed how that could be implemented. The idea is simple: just put an ID of the page behind the main domain name. So for the Seesmic example Item, the ID is QZ1Y7R6h9Q, which comes right after the seesmic.com: http://seesmic.com/QZ1Y7R6h9Q/. I guess any service can use this approach.
In my case sitution this is more difficult to do. The permalink for this Item is: http://www.sivas.com/microcontent/musings/blog/permalink_shorteners/, which makes a pretty large URI. I can shortened it a bit by using the ID of the blog Item: http://www.sivas.com/microcontent/musings/blog/4496/, which comes right out of the box.
Or I can handcode a URI redirect in the htaccess file. Thus http://www.sivas.com/4496/, points to the right Item. Naturally one should get rid othe www in an URL, they do not serve any purpose. This makes the URL even shorter: http://sivas.com/4496/. And finally one can shorten even more by using another encoding, such as base 36. In my example case this shortens the URL by only 1 digit, creating http://sivas.com/3ev/. And it could be even shorter, when one does not shorten all permalinks. One could create this shortened links on a need basis only.
This would encode all my MicroContent Items with a unique shortened URL. I just have to automate this easy procedure. It would however make my htaccess file very long, but I guess there are other approaches to do this as well. But this gives me full control over it all.
Unfortunately not all is rosy. When I create a Twitter-message, I do not look at the URL, my script picks the URL up and automatically encodes it. I guess I could make this script larger and calculate the length of the URL of the Item and then decide whether it is worthwhile to shorten or not.
[Inspiration Loic LeMeur blog]