What does the "//" in "http://serverfault.com/questions/ask" stand for?
I use URLs all the time typing them in with and without "//" after the "http:" but what does the "//" really stand for?
Solution 1:
Slashdot had an article about this a couple of days ago. Tim Berners-Lee indicates that there was no particular reason why the two slashes are there (see also http://bits.blogs.nytimes.com/2009/10/12/the-webs-inventor-regrets-one-small-thing/).
Personally, I like the idea of this style of URL:
http:/com/example/www/blah1/blah.html
There's no explicit "hostname" in such an URL. If your "www.example.com" server farm becomes overburdened with requests to the "/blah1" resource, you just create a "blah1.www.example.com" DNS record and point it to another web server farm that hosts the "/com/example/blah1" resource hierarchy.
No doubt there are DNS implications with such an idea, and it surely won't happen now (any more than suddenly having clocks that run counterclockwise coming into style), but I think it would've worked rather well.
Edit: SRV RR's for web sites would've been really nice, too. Hell-- SRV RR's for anything would be nice.
Solution 2:
There is an answer for that in Tim Berners-Lee's FAQ (link found in the slashdot discussion mentioned at @Evan Anderson's answer). Basically, he copied the filename syntax from Apollo Domain, where starting a path with a double slash followed by the name of a computer was used to transparently access files in other computers (a single slash is still the root directory). He simply prepended it with the protocol, in this case http
.
That special case still exists in the Unix standards, where two slashes at the beginning of a file name may be interpreted in an implementation-defined manner (three or more slashes are equivalent to just one). And the same convention is widely used in Windows, only with backslashes instead of forward slashes (it is called a UNC path there).
Solution 3:
xx:// is used to specify the protocol used, it's a double / so it can't be confused with just being a subfolder.