This post was originally going to be titled Why is Twitter Still Hash-Banging Away?, because I've
long been wondering why Twitter has not dropped the hash-bang—that ugly '
URLs. My question was answered earlier today when Dan Webb
tweeted that Twitter would be getting rid
of its hash-bangs once and for all:
'AJAX' is a misnomer—It need not be asynchronous, nor use XML, nor
identifier—anything that comes after a
#'—could be modified without requiring a page reload. As a result, many sites began
inserting the '
#' into each page's URL, which got the job done despite a few quirks. There was
just one problem—most of these pages were no longer crawlable by search engine spiders, as
Google saw this and had an idea for saving these poor, lost websites. They came up with a long
web developers, introducing a new crawling scheme for AJAXed websites. By using hash-bangs (
instead of hashes (
#), developers could indicate that their site supported this scheme and could
be indexed like a normal website. The catch was that all URLs would need to work properly when the
nonsensical string '
?_escaped_fragment_=' was inserted in place of the hash-bang. Normal visitors
would never have to see this behavior, of course, but it was important for playing nice with search
Sounds a bit convoluted? It is.
The web was going through some serious growing pains, and Google's solution was complex and awkward, despite its rapid adoption. Before long, a web developer named Mike Davies posted a rant which argued that sites making use of hash-bangs were actually "breaking the web." He was not alone, and many others followed with similar arguments.
Twitter jumped on the bandwagon as well, with what became known as #NewTwitter—not to be
confused with the more recent #NewNewTwitter—and visitors immediately started complaining
that the site was 'hijacking' their back buttons. In reality, Twitter was adding an extra page load
to inject the
#! into its URLs, which did not play nicely with browsers' page histories. The
resulting 'fix' actually came from the browsers themselves, and not from Twitter.
the hash-bang didn't break Gawker. All
of this voodoo-hackery was, some argued, a necessary part of the modern web. After all, how else
could web designers create AJAXed pages with proper URLs? There were plenty of sites making
perfectly innocent use of hash-bangs, without any audience outcry.
Gawker Media broke themselves.
The argument was finally put to rest in mid-2011 when the History API, also referred to as
'PushState,' came sailing along on a wave of other HTML5 features. By removing security
restrictions and allowing sites to modify their URLs on the fly, the History API fixed the problem
at its source. No longer were
#!'s required for sites to perform their AJAX magic. The
web had finally completed its long-drawn transition from a dull repository of static pages to a
world of rich, interactive applications.
And that brings us back to Twitter. Why, exactly, has it taken almost a year for one of the most
influential sites of its time, a bright and shining beacon of the modern web, to acknowledge this
obvious feature? And when will they finally implement it? The aforementioned #NewNewTwitter came
and went without any indication that the plague of
#!'s would ever go away. It is long past time
for Twitter to stop mangling its URLs with an outdated hack.