Monday 15 April 2013

URL, URI and URN


The specifications of URI and URL are defined by World Wide Web Consortium.

The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web (abbreviated WWW or W3).
Founded by Tim Berners-Lee at MIT and currently headed by him.

Tim Berners-Lee is one of the greatest Computer Scientists. He created the world’s first web page http://info.cern.ch/.

URI:

In computing, a uniform resource identifier (URI) provides a simple and extensible means for identifying a resource.
Best described at RFC 3986

Syntax as per RFC 3986 is:

The generic URI syntax consists of a hierarchical sequence of components referred to as the scheme, authority, path, query, and fragment.

      URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

      hier-part   = "//" authority path-abempty
                  / path-absolute
                  / path-rootless
                  / path-empty

The following is an example URI and their component parts:

         foo://example.com:8042/over/there?name=ferret#nose
         \_/   \______________/\_________/ \_________/ \__/
          |           |            |            |        |
       scheme     authority       path        query   fragment


URL:
A uniform resource locator, abbreviated URL is the subset of URI.
In addition to identification of resource, URL provides the means of locating the resource.
That is, basically physical addresses of objects which are retrievable using protocols already deployed on the net.
Example:
http://en.example.org/navn/url


URN:
Uniform Resource Names (URNs) are the subset of URI.
URNs are intended to serve as persistent, location-independent, resource identifiers.

Syntax as per RFC 2141 is:

<URN> ::= "urn:" <NID> ":" <NSS>

where <NID> is the Namespace Identifier, and <NSS> is the Namespace Specific String.  The leading "urn:" sequence is case-insensitive.

Example:
urn:ietf:rfc:2141
The IETF's RFC 2141.


Summary:

A URI is super set of URL and URN.
URL identifies a resource using one of the URI schemes.
URN identifies a resource independent of its location.

No comments:

Post a Comment