Shortlinking services (Was Re: [Wolves] iFolders)

Andy Smith andy at lug.org.uk
Wed May 3 15:13:49 BST 2006


On Wed, May 03, 2006 at 02:44:08PM +0100, David Goodwin wrote:
> >As an aside, I find tinyurl and its like really annoying as you
> >can't tell where they go to without going, thus I can't tell if I've
> >already seen it, nor guess if it is safe for work, etc.
> 
> I believe they also expire if not used within a certain duration - so I 
> agree -  annoying/bad/evil.

So here is a spec for the ideal short linking service.

It should:

- Pick a sane maximum length (e.g. 45 characters total including
  protocol) and encode as much context from the original URL into
  the short one, but would fold "weird" characters out.  e.g.

  http://example.com/foo/?bar=7263&baz=98473/ASQ/****/KF9

  may end up as

  http://someshort.foo/example.com/foo/_0nG6d3

  The last bit is 6 digits in base 64 (0-9, a-z, A-Z, underscore and
  hyphen) as unique identifier.  This allows for storage of up to
  68,719,476,736 unique URLs before identifier reuse.

- This would also work as:

  http://someshort.foo/0nG6d3

  for the (rare) situations where space is at a premium and you
  just want the shortest url possible.

- Keep both forms of link working until all identifiers are
  used, then LEAST POPULAR ones would be reused.

- Cache the content of the URL for local viewing if the
  remote site is unavailable for some reason.

- Virus check content (e.g. ClamAV) and give a warning before
  redirection if the content is known to be malicious.

- Offer an API so that given a unique ID (e.g. "0nG6d3") one can
  query for info about the content of the URL, e.g. its size,
  content-type, when it was cached, dimensions if an image, duration
  if audio/video, etc. etc.

  (this is useful for interactive services such as IRC where all
  URLs can be automatically shortened)

Can anyone think of anything else?

Does this already exist?

Cheers,
Andy

-- 
http://strugglers.net/wiki/Xen_hosting -- A Xen VPS hosting hobby
Encrypted mail welcome - keyid 0x604DE5DB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/wolves/attachments/20060503/aa55dd01/attachment.bin


More information about the Wolves mailing list