Tuesday, December 23rd, 2008

Lengthening Out URLs

Category: JavaScript, JSON, Usability, Utility

In our age of information and technology, there isn’t as much mystery as there used to be. In that sense, short URLs (e.g., tinyurl.com/123) can be fun! Who knows where you’ll wind up.

Some folks aren’t as happy with uncertainty in hyperlinking; one of them, Darragh Curran, wrote in to tell us about his project: Long URL Please.

Long URL please (http://www.longurlplease.com) is a JSON webservice to
efficiently convert short urls (tinyurl.com/123) to their originals.
I’ve got a simple jquery plugin to take advantage of it, and a firefox
plugin. It’s running on google app engine.

Darragh hates short URLs so much he’s offering to contribute his time to help wipe them off the face of the web:

I’d love to see it used in apps like twhirl/tweetdeck/twitterific, on
microblogging sites and pretty much anywhere that’s got lots of short
urls. In that respect I’ll happily contribute my time to help those
people/teams integrate with the service.

There’s even a bookmarklet.

Posted by Ben Galbraith at 10:22 am

4 rating from 36 votes


Comments feed TrackBack URI

Hawhaw, only an Irishman could think of such a project! I saw much much kudos to the fella, I’d happily integrate it!

Comment by oopstudios — December 23, 2008

Ben, Thanks a million for posting that.

David, great to hear you like it. Keep me posted if you integrate it somewhere – or if you’ve any feedback to improve it. I like your DLINK link improver btw.

Comment by darraghcurran — December 23, 2008

Aye, cheers for the comments Darragh! I’m actually just over the (small) pond in yonder Newcastle. I was thinking that for good coverage you could write a modification of the twitter callback script: http://twitter.com/javascripts/blogger.js Also, if you add in a regex to check for the main sites, you could really reduce the overhead. For example, if people started parsing *all* links on their pages it’d really screw your swervers, but if it only ever sent through tinyurl and friends then you’d be sure to get proper hits!

Comment by oopstudios — December 23, 2008

OOPs, I’m such a plum, you already have that regex! I was wondering why the code looked weird, it was the wrong one! I’ll still have a ponder about it though!

Comment by oopstudios — December 23, 2008

Hahahahahaha……!! :P
Great work anyway, I see I’m not the only one with an “itch” around here … ;)

Comment by ThomasHansen — December 23, 2008

oopstudios – unfortunately even with that regexp check – the problem still exists – some of the shortener services are unreliable from time to time.

In the future I may look at lengthening them in order of how reliable/quick I know the shortener service to be, batching the dodgy ones near the end. Caching helps this also – once we’ve lengthened a url from a slow/unreliable service once – it’s only a question of how quick/reliable longurlplease can be!!!

Thomas, I’m so glad I scratched this itch – it’s been fun – and now I hope it’ll be useful or inspiring for others.

Comment by darraghcurran — December 23, 2008

I’m a big fan of the LongURL Greasemonkey script. http://userscripts.org/scripts/show/32115

Comment by tj111 — December 23, 2008

I like http://LongURL.org aswell. Glad I only discovered it two days ago – because it’s been fun to write my own one.

I’ve a greasemonkey script for longurlplease – but the firefox extension runs earlier/quicker – I may throw it up on userscripts so that greasemonkey fans can use it.

Comment by darraghcurran — December 23, 2008

I like this as well, but I primarily use Safari. I don’t understand how to use the suggested bookmarklet. I’ve installed the bookmarklet, but then what do you do?

I’ve tried clicking it, dragging short URLs to it etc. Nothing works.


Comment by AppBeacon — December 23, 2008

@AppBeacon You just add it to your favorites [drag it to the bar or right click and save as bookmark.] After that you should be able to open up a web page that has short urls and just click on the newly added bookmarklet in your favorites. It should than run.

Comment by epascarello — December 23, 2008

I thought of a possible new direction to take this. How about running it through something like FoxFilter to remove bad links too? https://addons.mozilla.org/en-US/firefox/addon/4351 (and thanks for the ROFLMAO Thomas!)

Comment by oopstudios — December 23, 2008

@epascarello : Thanks for replying. That is what works. It happens so unobtrusively in Safari that I didn’t notice a change.

In FF, the page jitters, the status bar shows some Javascript, etc.

Comment by AppBeacon — December 23, 2008

I’ve added this to my site to convert/expand tinyurl links which are pulled in from my twitter timeline and shown on my page. But I chose to not overwrite the visible text portion of links…

instead, I change the underlying href (so the click of the link will go straight to the right location, and so it can also get the “visited” color styling behavior), and also I add a title/tooltip attribute to it so that a user who hovers over the shortened URL (which preserves layout needs) can see the expanded URL in the tooltip and in the status bar of the browser. Best of both worlds. :)

Now, if they’d get a crossdomain.xml policy file, that’d be nice.

Comment by shadedecho — December 24, 2008

Do you guys really see so many short URLs? I only rarely see them…

Comment by eyelidlessness — December 24, 2008

Annotated links: http://alink.linkstore.ru
Short URL plus your annotations (post-it). JSON API is supported

Comment by coldjava — December 28, 2008

Eh, short URLs need not be opaque: http://tinyurl.com/OperationBSU

Alternately, many offer preview functions: http://preview.tinyurl.com/OperationBSU

Sometimes, the URLs can be more descriptive than the original URLs: http://tinyurl.com/Missionaries-Jailed-in-Gambia actually tells you something about the story, as opposed to the long BBC.co.uk URL that only tells you it has some relationship to Scotland.

Mind you, if various sites offered more concise, descriptive URLs, nobody would bother with shortener services.

Comment by Semiapies — December 30, 2008

Strangely enough, the bookmarklet throws an error if you run it on ajaxian.com!

Comment by mrmass — January 2, 2009

LongURLPlease has integrated flXHR (http://flxhr.flensed.com/) into the API, which allows you to use the javascript API in your application without needing the reliance on jQuery (if you need so). If jQuery is able to be (or is already being) used in your app, it’s probably easier to go that way. But, sometimes a jQuery (or other framework) dependency isn’t possible, so this is a great API addition that Darragh has done to make his API more versatile/flexible.
Read more here: http://tinyurl.com/9e474a

Comment by shadedecho — January 6, 2009

The webapp kindurl (http://kindurl.com) was created for the same purpose. It takes longURLs and makes prettified URLs. Very similar to tinyurl but gives context about where the url redirects.

Comment by spammb — January 6, 2009

Leave a comment

You must be logged in to post a comment.