Thursday, March 18, 2010

URL Shortening

URL shortening is a technique on the World Wide Web where a provider converts a long URL into a shorter one. It generates a 3 to 6 character long key for the URL and records it against the original URL in its database. When the user requests the shortened URL (service provider's URL + key) over the web, it retrieves the corresponding actual URL and redirects the user to the actual URL. The first notable URL shortening service, TinyURL, was launched in 2002; however, the idea dates to at least 2001.


Purpose:
  • Copying a URL that is hundreds of characters long can make the URL garbled. A short URL is more useful to copy from an e-mail message or forum post.

  • On Twitter and some instant messaging services, there is a total character limit to messages. Using a URL shortener can enable users to include a URL that would not fit.


URL Shortening Wiki
URL Shortening: Hashes In Practice
Tiny UID Algorithm generation
Creating a short URL service using PHP and MySQL