The DOM location interface exposes the HTML document's URI parsed into its properties. However, it is
ancient and has problems that bug me but otherwise rarely show up in the real world. Complaining about mostly theoretical issues is why blogging exists, so here goes:
The location object's search, hash, and protocol properties are all misnomers that lead to confusion about the correct terms:
The 'search' property returns the URI's query property. The query property isn't limited to containing search terms.
The 'hash' property returns the URI's fragment property. This one is just named after its delimiter. It should be called the fragment.
The 'protocol' property returns the URI's scheme property. A URI's scheme isn't necessarily a protocol. The http URI scheme of course uses the HTTP protocol, but the https URI scheme is
the HTTP protocol over SSL/TLS - there is no HTTPS protocol. Similarly for something like mailto - there is no mailto wire protocol.
The 'hash' and 'search' location properties both return null in the case that their corresponding URI property doesn't exist or if its the
empty string. A URI with no query property and a URI with an empty string query property that are otherwise the same, are not equal URIs and are allowed by HTTP to return different content.
Similarly for the fragment. Unless the specific URI scheme defines otherwise, an empty query or hash isn't the same as no query or
hash.
But like complaining about the number of minutes in an hour none of this can ever change without huge compat issues on the web.
Accordingly I can only give my thanks to Anne van Kesteren and the awesome work on the URL standard moving towards a more sane (but still working
practically within the constraints of compat) location object and URI parsing in the browser.
The Dancebulance - Gov Ball 2012 Lineup (by nathanjbarnatt)
Another Nathan Barnatt video with awesome music and dance moves. Also enjoying the music video for third song in this video “Barbara Streisand” by Duck Sauce: http://www.youtube.com/watch?v=uu_zwdmz0hE
2011 Sep 29, 8:35This story is funny and also reminds me to go eat at Matador... "Twisted Pixel chief creative officer Josh Bear had responded with abounding confidence, if only to mask the truth. Because the fact of
the matter, the fact that he and CEO Mike Wilford were all too aware of, as they sat in Redmond, WA Tex-Mex restaurant The Matador, was this: The idea wasn't "awesome." It was nonexistent." foodmicrosoftgamegunstringerhumortechnical
2011 Aug 17, 4:52This is awesome: "I challenge Bethesda to a game of Quake 3. ... If we win, you drop the lawsuit. If you win, we will change the name of Scrolls to something you’re fine with." I could have been a
lawyer if things worked this way.minecraftgamelawquake3
Also, the movie Moon is really good on a variety of points. Sam Rockwell and the voice of Kevin Spacey! Its
available on Netflix Watch Instantly so you have no excuse!