David Beroff (d4b) wrote,
David Beroff
d4b

Reducing URL length

I'm designing some of the short-URL mechanisms for AboutTh.is tonight, and I was actually able to borrow from my earlier seq.tw effort that was started (and then abandoned) in 2010. (Driving 20 hours a day seemed to sap my energy to be able to invest time in anything else back then.) I wasn't surprised to find tonight that my earlier thoughts on base 64 URL encoding actually match an Internet standard. Here's an excerpt from the AboutTh.is design, partially lifted from seq.tw:
The base 64 value could just be used as-is in URL's, except for a few specific business rules. First, the string must have a minimum of four "digits" (characters), as shorter strings have reserved purposes, and we also wish to avoid appearing "too small" when the site is first launched. Second, as all URL's are intended to be public, (with no password or financial data disclosed), we really don't need anything more complex, but since all the "cool kids", (e.g., bit.ly, goo.gl, et al.), are obfuscating their shortened URL's, for appearance's sake, we use a mild scrambling/mapping method that's still computationally cheap. This is done by rearranging the least-significant 24 bits (four "digits") and then flipping about half of them.
Tags: courier, marketing, mtat, seq.tw, webdev
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments