Why You Should Be Bothered About Twitter's t.co Url Shortener And A Way To Bypass It

Posted on Aug 26, 2012

Twitter is using this t.co shortener just to track all the links being shared across it’s site. It can track how many links are being shared and how many of them are clicked. (Technically hat also enables them to know which resources are being more popular among the users. I’m not sure how they are using that data.) But the real trouble is, t.co is just another server on your way to the original url.

If you notice carefully, most of the links you share or click nowadays are already shortened. And thanks to services like bit.ly, everyone can make a new link shortener in no time. While these shortened urls do look nice, they just push one node away from your destination node. When you click a shortened url, you are taken to the server where the link shortener is hosted and then redirected to the original destination. So, if it were to take you 100ms to reach your url, it’ll take you some more time than that if you click the shortener url.

t.co is adding another node above what you already have. So that’s two node you have to be redirected from. For example, take this tweet -

TechCrunch already uses their own url shortener tcrn.ch, as you see. And when they share it on Twitter, it’s being shortened with the t.co url shortener. When you read the tweet, you can see the tcrn.ch url, but if you click it, you’ll see that it’ll take you to a t.co link. That means, it’s an anchor, when the original url is the text and the t.co link is the url. That’s an effin bummer. :|

So this is how you have to visit your document now -

http://t.co/acgTzWKR -> http://tcrn.ch/NTr6S8 -> http://techcrunch.com/2012/08/26/where-have-the-users-gone/

So I have to go through two server before I can get to my link. That’s really a pain in the arse for me, and should be for you too. Because if anyday the t.co server is slow because of the constant load it serves, you have to wait.

I effin hate that. So wanted to get my way around it. I inspected the anchor tag of Twitter Web, this is what I got -

Now if you see closely, twitter stores the original url as the value of data-expanded-url in the anchor tag. That is good for me. I just pushed a simple Javascript code that replaces the value of href property with the value of data-expanded-url’s value. And my work is done.

Here is the javascript code -

Just use any javascript pusher and push this to twitter.com. I personally use Personalized Web. so I created this recipe for it -