An idea for URL shortners: content type hinting

Regardless of how you [feel about URL shortening services](http://kottke.org/09/04/url-shorteners-suck) they have become an essential component of the Internet today. Services like Twitter make them all but a necessity so that character starved bloggers can squeeze as much copy into a tweet as possible, after all, [every character counts](http://www.copyblogger.com/twitter-writing/).
I recently watched an [interview with Ev Williams](http://revision3.com/tekzilla/web20/) in which he talked briefly about making features for a product simply by blessing and codifying what your users are already doing in some meaningful way. His example was their observing people using the `@twittername` to signify a reply and their subsequent decision to auto-link that identifier to the person’s Twitter account. That interview, plus a later conversation gave me an idea for a pattern I would love to see adopted by URL shortening services in the hopes of laying the groundwork for similar serendipitous features on Twitter.
The problem is thus: URL shortening services make the content being linked to even more opaque to a client than it already is. When you think about what can be inferred by a complete URL on the Internet you realize just how much information is lost in the shortening process. Consider these URLs:
**[http://www.youtube.com/watch?v=Z19zFlPah-o](http://www.youtube.com/watch?v=Z19zFlPah-o)**
From this URL you can infer that what is being linked to is a video. You also know the video’s ID and could conceivably embed your own video player to display it on your web site.
**[http://www.flickr.com/photos/dorkmaster/3287780385/](http://www.flickr.com/photos/dorkmaster/3287780385/)**
From this URL you can infer that what is being linked to is a photo, you have a handle to the identity of the person who uploaded the photo, and you have an ID to the photo.
And the list goes on. Even relatively random URLs from stupid blogs can tell you a lot:
**[http://www.majordojo.com/photos/2009/04/jellyfish.php](http://www.majordojo.com/photos/2009/04/jellyfish.php)**
This tells you at the very least that what is being linked to is at least a web page, most likely in HTML. You could infer more I suppose, but it would be difficult for a machine to do so without actually following the link.
And that is the crux – you don’t want to force clients to follow the link in order to make these simple inferences. Ideally, a shortened URL could provide some kind of hint to as to the nature of the content being linked to on the other end so that Twitterific for example could embed a “play” button to play a video, or even embed a photo posted via TwitPic directly in your feed.
So what if a convention was defined and adopted that:
* didn’t increase the length of a shortened URL that much.
* that was completely optional.
* that was utilized in the same manner across multiple shortening services?
Then clients would be free to do whatever they wanted with the extra metadata, mainly ignore it, or bring some added value to their users. So here is my proposal:
* URL shorteners should append to any shortened URL a simple one character code identifying the content type of the content being linked to delimited by a hash or pound sign, e.g. “#”. For example, both of the following URLs remain resolvable despite being augmented with an additional two characters:
* [http://bit.ly/17y2DG#v](http://bit.ly/17y2DG#v)
* [http://bit.ly/18yZ6g#i](http://bit.ly/18yZ6g#i)
* URL shorteners ideally agree to a standard, or at least publish a lookup table for their coding conventions. Such a look up table might be as simple as:

Code Description
i an image
v a video
o a page with an oembed tag
h html
b a blog post with comments

The specifics don’t really matter provided that the codes tell clients something that would be useful to them when processing a link to a resource.
It also has made me ponder a little bit how tweets could be similarly augmented to include additional meta data about the tweets, as hash tags do, and what clients could then turn around and do with that extra little bit (no pun intended) of information.


10 Comments on “An idea for URL shortners: content type hinting”

  1. I think publishing lookup tables can open some opportunity for spammers.
    Bitly moving in the similar direction with their optional keyword:
    http://bit.ly/sci-blog
    I think we can create this shortening service of yours.

  2. I have to admit I am very impressed with the quality of your blog. It is certainly a pleasure to read as I do enjoy your posts.

  3. Came across your blog post when i was doing some research for school (got distracted). I am very new to internet marketing but am starting to look at promoting clickbank. Do affiliate sites care if yo cloak their links or does it matter to them at all. I just want to make sure it is wrong.

  4. Debbra Doyer says:

    Your blog made me think of a quatation: “Don’t anthropomorphize computers — they hate it”
    Think it over my friend 🙂

  5. I guess I really don’t have the time.

  6. Don’t ask me why, but I love this guy. I had no prior knowledge of him until I saw this figure on the back of the Blue Beetle card. I’d go as far as to say he motivated me to pick up wave 7 and start collecting DCUC (!). Mine did come with a messed up emblem, though. It’s missing a small section on one of the outer loops. Kind of depressing because it was the only Aquaman figure I had come across at that point and I really wanted to complete AS. Of course I saw another Aquaman at Wal-mart last and almost bought him just to switch out the torso and return him, but decided against it because the rest of the torso had sloppy paint. It would just be an endless cycle. I determined it would be easier to fix the logo myself.

  7. I think this may be enlightening and don’t see often. This is good information.

  8. Sofia says:

    Hello, I like this post a lot, it echoes my own thoughts quite keenly. I’m at work now, so I should get back to my projects, but I’ve saved the url and I’ll come back to read more of your posts.

  9. A great way to start out out can be to write down down the issues that you want to in your dream residence after which put them into a primary hand-drawn floorplan. Alter it as you see the need to add or subtract some issues, and then when you’re comfortable with it, talk to a house designer about your need for house blueprints. You actually need to take into account some options like patios and decks, a big kitchen, a cathedral ceiling, plenty of glass and probably skylights, further loos and walk-in closets.

  10. A great way to start out out can be to write down down the issues that you want to in your dream residence after which put them into a primary hand-drawn floorplan. Alter it as you see the need to add or subtract some issues, and then when you’re comfortable with it, talk to a house designer about your need for house blueprints. You actually need to take into account some options like patios and decks, a big kitchen, a cathedral ceiling, plenty of glass and probably skylights, further loos and walk-in closets.


Leave a comment