As the web world continues to granulate and become ever more complex with routing, client side scripting, and communication, the shape of how we use URL’s continues to extend. It’s very common to see these pound marks in URL’s which provide website functions very different from their original specifications. Pound symbols were originally intended as an HTML4.01 anchor reference. Using a <a href=”http://www.link.com/ page.html#myanchor”>The Link</a> you could navigate to a specific location on a page, where ever your <a name=”myanchor”> </a> was located. These days though, more #’s are being used in much more innovative ways.
So Phil, why the heck are you telling me this? Well, these little # symbols are adding yet another functionality to what we can do on pages, let me give you a couple of things you can now, and always have been able to, do with #’s in your URL.
URL Rewrite Emulation
Man, do I love URL Rewrites. These guys really clean up links and do a vast number of wonders on Search Engine Optimization. But sometimes your environment gets too cluttered with rewrites or you don’t have access to rewrites, something needs to be tunneled, or you are stuck in a monstrous CMS which has your hands tied and legs bound. Using #’s in your URL, sent to a Server Side script, then utilizing the Server Side script to read and interpret is an easy option.
Cleaner than ?URL=variables
The previous example, using Server Side URL reading via rewrite emulation always begs the question of, why not just use a variable on your request. Again this comes back to SEO and how clean #’s make your URL address look. Take a look at how Twitter is done, using a /#!/. It’s almost like Twitter uses the pound as a piece of flare or something.