Interview Questions On ASP.Net :: What is the difference between URL and URI?

Ram Pothuraju


URI (Uniform Resource Identifier)

The URI identifies a resource either by location, or a name.
URI subdivided into two general categories

URL(Uniform Resource Locator)

URN (Uniform Resource Name)

URL(Uniform Resource Locator)

A URL is one of the specialization of URI that defines the network location of a specific resource.
The URL provides a location and the protocol that would be used to access the stored data.
URL defines how the resource can be obtained.
We use URLs every day in the form of http://yahoo.com, etc. But a URL doesn’t have to be an HTTP URL, it can be ftp://yahoo.com, smb://yahoo.com, etc.

URN (Uniform Resource Name)

The URN describes a group of URIs that contains only the name of the resource and not necessarily where it is located and how to get it.

You may see URNs used in XML Schema documents to define a namespace, usually using a syntax such as:
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:example"
Here the targetNamespace use a URN. It defines an identifier to the namespace, but it does not define a location.

Post a Comment

0Comments

Post a Comment (0)