URI, URL, urn difference, and contact

Source: Internet
Author: User
Tags rfc

 

Uri,url,urn

As can be seen from the above picture, there are three different concepts Uri,url,urn. The best way to discuss such a problem is to go back to the point where we have collected some information in RFC 3986:uniform Resource Identifier (URI): Generic Syntax:

"A Uniform Resource Identifier (URI) is a compact string used to indicate abstract or physical resources. ”

"A URI can be further divided into locators, names, or both." The term "Uniform Resource Locator" (URL) is a subset of URIs that, in addition to identifying a resource, provides a primary access mechanism (such as its network "location") to locate the resource. “

That's what we all know about Wikipedia, which digests this piece well and describes it more vividly:

"URIs can be divided into url,urn or one thing with locators and names characteristics at the same time. A URN acts like a person's name, and the URL is like a person's address. In other words: The urn determines the identity of the object, and the URL provides a way to find it. ”

We can get some conclusions from these descriptions:

    • First, the URL is one of the URIs (see it through that graph). So someone told you that the URL is not a URI, he is wrong.
    • The "Access mechanism", "network location", is of course the URL where the URI can be made. e.g. http:// or.. ftp://
    • A urn is part of a unique identity and is a special name.

Let's take a look at an example, when it comes to an RfC that comes from authority:

    • ftp://ftp.is.co.za/rfc/rfc1808.txt(also a URL because of the protocol)
    • http://www.ietf.org/rfc/rfc2396.txt(also a URL because of the protocol)
    • ldap://[2001:db8::7]/c=GB?objectClass?one(also a URL because of the protocol)
    • mailto:[email protected](also a URL because of the protocol)
    • news:comp.infosystems.www.servers.unix(also a URL because of the protocol)
    • tel:+1-816-555-1212
    • telnet://192.0.2.16:80/(also a URL because of the protocol)
    • urn:oasis:names:specification:docbook:dtd:xml:4.1.2

These are all URIs, some of which are URLs. What? is the ones that provide access mechanisms.

Summarize

Here's the time to answer the question:

When we replace the Web address, is the URI and URL that more accurate?

Based on the many articles I read, including the RfC, I would like to say that URIs are more accurate.

Don't worry, I have my reasons:

The URI that we often use is not a strictly technical URL. For example: The file you need is in the files.hp.com . This is the URI, but not the url--system may have a lot of protocols and ports to make positive

The correct response.

You go http://files.hp.com and ftp://files.hp.com . May get completely different content. This situation may be more common, think of different Google domain names on different services AH.

So, with a URI, you are usually technically correct, and the URL is not necessarily.

URI, URL, urn difference, and contact

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.