Url shortners the safe way

Published on den 23 January 2011

If you are anything like me you like to know, or atleast have a chance to know, where links go before you click them. Here is my proposal on how shorterners could make this possible.

/Preview/ to the people

Let's take this tweet from my friend @Miickel

Favorite Creative Links of the Week (3, 2011) http://t.co/Sxoa6gj via @PixelTango

I trust him and wouldn't hesitate to follow that link. But in some cases you see shortened links by people you do not know or trust. It has happened more than once that I haven't followed a link even though I thought it looked interesting simply because I didn't knew where it would take me. For all I knew it could be a link to a nasty virus.

The solution is quite easy. If there was a specification that said that each Url shortener should have an endpoint that can return the full Url. With the link above it could be http://t.co/Preview/Sxoa6gj.

The endpoint should return the url as text unless you send the request as "application/json" where it should return it as jsonp so that we could use it from javascript.

Note: The parameter for a callback function would be needed in the case of JsonP.  

But this could be tampered with too!

Yes, it is not bulletproof. The shortener service could return fake urls or the client could show false full urls. And even worse a decent looking Url could still point to evil things. The thing is that it's better than today though. I feel pretty confident that the larger shorteners would not temper with the preview Url so if it this idea, or something similar, came true I would have a much better chance to evaluate the risk of clicking a shortened link.

Please share your thoughts and if you think it is a good idea please spread the word!

Then feel free to it or if you have any comments or questions mention @MikaelEliasson on Twitter.

CTO and co-founder at Bokio with a background as an elite athlete. Still doing a lot of sports but more for fun.

#development, #web, #orienteering, #running, #cycling, #boardgames, #personaldevelopment