Wednesday, December 6, 2006

URL v/s URI v/s URN

> This is a short list of URL's
>
> http://www.google.com
> http://www.msn.com
> http://www.irc2k.com
>
> This is a short list of URI's
>
> http://www.google.com/index.html
> http://www.irc2k.com/irc2k/index3.php

Both are lists of URIs and URLs, because by definition a URL
is a URI. The term 'URI', as it is widely employed in
Internet specifications today, comprises the two terms 'URL'
and 'URN' (Locator and Name); that is, 'URI' is the term given
to the superset of URLs and URNs. All three are discussed
formally in RFC3986: 1.1.3 <http://www.ietf.org/rfc/rfc3986>
and in greater detail in <http://www.ietf.org/rfc/rfc3305>.

The presence or not of an explicit path doesn't determine
whether a URI is a URL. The determining factor is whether the
URI specifies the 'location' of the resource. (Some URIs
don't, and aren't URLs; e.g., *.) By
that token, all HTTP URIs are URLs, since they specify the
'primary access mechanism', namely HTTP.

* This URN names /The Cambridge Encyclopedia of the English
Language/ by David Crystal. The URN namespace ISBN is
documented in RFC3187 <http://www.ietf.org/rfc/rfc3187>.

No comments: