Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Origin of "://" in many URI syntaxes [closed]

Anybody knows where the "://" or the "//" comes from in most URIs syntaxes? For instance, why isn't it written like "http:www.example.com"?

like image 204
pmezard Avatar asked Sep 07 '09 08:09

pmezard


2 Answers

a1kmm's answer is good for specific application to URLs, but if you're curious as to the semantic origin of the double slash, take a look at this article:

http://www.w3.org/DesignIssues/Axioms.html

It is worth noting that the syntax with the double slash can in fact be extended for use with a triple slash if one wanted to be able to start at any level in a much more complicated hierarchical structure. For example, suppose international telephone numbers were to be extended to cover a planetary code in the future. Then the planetary code could be attached to the front of the international code. The triple slash could introduce the interplanetary code, and the double slash would introduce the international code. Indeed, this is how the double slash came to be: when hierarchical naming schemes such as those in unix file systems was extended to a networks file system on the Apollo domain the extra slash was introduced. Similarly, Microsoft NT networking now uses double backslash in exactly the same way.

like image 114
Amber Avatar answered Oct 08 '22 11:10

Amber


The definitive reference on URLs is RFC1738, which came out in December 1994. See http://www.ietf.org/rfc/rfc1738.txt

To quote from the RFC:

URLs are written in general as <scheme>:<scheme-specific-part>

and later on says

While the syntax for the rest of the URL may vary depending on the particular scheme selected, URL schemes that involve the direct use of an IP-based protocol to a specified host on the Internet use a common syntax for the scheme-specific data:
//<user>:<password>@<host>:<port>/<url-path>
Some or all of the parts "<user>:<password>@", ":<password>", ":<port>", and "/<url-path>" may be excluded. The scheme specific data start with a double slash "//" to indicate that it complies with the common Internet scheme syntax.
like image 38
a1kmm Avatar answered Oct 08 '22 11:10

a1kmm