2LeggedSpider

YouTube says I have shorter URLs too!

Posted in technology by Sumit Thomas on December 22, 2009

[tweetmeme style=”compact”]Following Google’s launch of its Short URL service Goo.gl, its subsidiary Youtube has come out with its own Short URL service Youtu.be

YouTube’s intention for coming up with its own Short URL service is as per this blog to provide a shorter version of Youtube links.

To use youtu.be manually, simply take a URL like http://www.youtube.com/watch?v=FdeioVndUhs and replace the “http://www.youtube.com/watch?v=” with “http://youtu.be/” to get: http://youtu.be/FdeioVndUhs Plug that shorter URL into a browser, and you’ll see it redirects to that video.

Well it doesn’t look too short to me. The shorter version of http://www.youtube.com/watch?v=FdeioVndUhs in bit.ly is http://bit.ly/7Se5hu compared to Youtu.be’s http://youtu.be/FdeioVndUhs. The Video ID in YouTube links are very long and needs to be shortened further.

The big question for me though is why did YouTube come up with its own Shorter URLs when they could have used Goo.gl? Is it some kind of marketing technique or is it YouTube’s way of saying we have it too!

Whats next? Yah.oo?

Another URL Shortener and it is from Google

Posted in google, technology by Sumit Thomas on December 18, 2009

[tweetmeme style=”compact”]Twitter has opened the way for a new stream of online service – URL Shortening! and cousin, the business is booming! 🙂

Goo.gl is Google’s version of URL Shortening service. Unlike its counterpart tinyurl.com or bit.ly, Goo.gl is not a stand alone tool to generate short URLs. For now, the only way you can shorten a URL using Goo.gl is by using the Google Toolbar or if you have a Feedburner account, integrate your Feedburner feeds with your Twitter account.

If you are a Google Chrome user, you can install this extension which lets you use Goo.gl without the toolbar. But it works only in the Google Chrome Beta version though.

Facebook has its own URL Shortener as well fb.me. I am not sure when it started but I’ve seen couple of tweets with fb.me URL. It will be very interesting to know the long term objective of Google and FB and what it will do to the existing players.

Tagged with: , ,

Generating a Shorter URL using bit.ly API and jQuery

Posted in AJAX, jquery by Sumit Thomas on December 18, 2009

[tweetmeme style=”compact”]Here is a simple jQuery script to generate shorter URL using the bit.ly API.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>URL Shortening</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#btnShort").click(function() {
                var longUrl = $("#longUrl").val();
                var shortUrl = $("#shortUrl");
                shortUrl.html("Loading...");
                var params = {
                    version: "2.0.1",
                    longUrl: longUrl,
                    login: "bitlyapidemo",
                    apiKey: "R_0da49e0a9118ff35f52f629d2d71bf07"
                };
 
                $.getJSON("http://api.bit.ly/shorten",
                { version: params.version, longUrl: params.longUrl, login: params.login, apiKey: params.apiKey },
                function(data) {
                    shortUrl.html(data.results[longUrl].shortUrl);
                });
            });
        });
 
    </script>

</head>
<body>
    <input type="text" id="longUrl" /><input type="button" id="btnShort" value="Shorten!" />
    <br />
    <div id="shortUrl" />
</body>
</html>

URL Shortening

You can go through the bit.ly API documentation and try out the remaining methods as well.

Tagged with: , ,