Understanding of Url,uri and Urns

Source: Internet
Author: User

I think a lot of people, like me, don't know the difference between URIs and URLs, and one might think that this is a different expression of the concept of unification.

Let's look at the definition first:

Uri:uniform Resource Identifier, the Uniform Resource identifier, is used to uniquely identify a resource.

Url:uniform Resource Locator, Uniform Resource Locator. That is, the URL can be used to identify a resource, and it also indicates how to locate the resource.

Urn:uniform Resource name, Uniform Resource naming. That is, the resource is represented by its name.

Well, the definition has been read, may still not understand the following we will elaborate on the difference and use of the three.

A URL is definitely a URI, but a URI is not necessarily a url,url just a representation of a URI. The gap between the two can be distinguished from the name, the URI is a resource marker, all he only requires "identity", and the URL is the main difference between the URI is that the URL in addition to the "identity" of the URI, but also has the positioning function, can be used to describe the specific location of the resource, The protocol used to obtain resources is also indicated. A full URL contains the protocol name, the host name (IP or domain name), the port number (port number is not written by default to 80 ports), the path, and the 5 parts of the query string. For example: http://www.microsoft.com:80/images/hello.png?type=png. Such a URL, the above 5 parts are: Network Transport protocol name: HTTP, host: www.mcrosoft.com, Port number: 80, Path: Images/hello.png query string: type=png.

After reading the difference between the URL and the URI, we are looking at what the urn is. A urn is also a form of a URL, it is different from the URL is not related to the location of the resource, formally due to the location of the resource is identified by a URN changes in location, its URI can remain unchanged.

So it seems that URLs and urns are an extension of URIs, a form of representation, URLs and urns are definitely URIs, but URIs are not necessarily urns or URLs.

Understanding of Url,uri and Urns

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.