What are Uri, URL, and urn?

Source: Internet
Author: User

 

What are Uri, URL, and urn?

Uri (Uniform Resource identify), URL (Uniform resource location), and urn (Uniform Resource Name)
Is a standard way to identify, locate, and name resources on the Internet; Url, urn is a subset of URIs.

The URI cannot locate or read/write resources. This is a unified resource locator (URL) task.
A URL is a URI, but its outline component is a known network protocol (Protocol), and it processes the URI component and a protocol.Program(A read/write mechanism for resource locators and constraints established in accordance with the Protocol to communicate with resources ).
Generally, a URI cannot provide a name with persistent inconvenience for a resource. This is a unified Resource Name (URN) task. Urn is also a URI, but it is globally unique and inconvenient, even if the resource does not exist or is no longer used.
The basic form of the address on the Web is Uri, which represents a unified resource identifier. There are two forms:
URL: currently, the most common form of URI is the ubiquitous URL or unified resource locator.
URN: An Update Form of a URL. The Uniform Resource Name (urn, Uniform Resource Name) does not depend on the location, and may reduce the number of invalid connections. However, its popularity still takes time because it requires support from more sophisticated software.

The URI, URL, and urn in the system are associated with each other. The category of URI is located at the top of the system, and the category of URL and urn is located at the bottom of the system. This sort shows that the URL and urn are sub-categories of the URI. The URI represents a unified resource identifier, which is a simple string that identifies the resource in a unified (standardized) way. In typical cases, this string starts with Scheme (the identifier of the namespace named URI -- a group of related names). The syntax is as follows:
[Scheme:] scheme-specific-part
Uri starts with scheme and colon. Scheme starts with an upper/lower-case letter and is left blank or followed by more upper/lower-case letters, numbers, plus signs, minus signs, and periods. The colon separates scheme from scheme-specific-part, and the syntax and meaning of scheme-specific-part are determined by the URI namespace.
One example is the http://www.cnn.com, where HTTP is scheme, // www.cnn.com is scheme-specific-part, and its scheme and scheme-specific-part are separated by colons.

We can classify Uris by absolute or relative. An absolute URI refers to a URI starting with scheme (followed by a colon. The http://www.cnn.com mentioned above is an example of absolute Uri, and other examples include mailto: jeff@javajeff.com, news: Comp. Lang. java. Help and XYZ: // whatever. You can regard the absolute URI as a reference to a resource in some way, and this method does not depend on the environment where the identifier appears.
If you use a file system for analogy, the absolute URI is similar to the path of a file starting from the root directory. Unlike the absolute Uri, the relative URI is not a URI starting with scheme (followed by a colon.
One example is articles/articles.html. You can regard the relative URI as a reference to a resource in a certain way, which depends on the environment where the identifier appears. If the file system is used as an analogy, the relative URI is similar to the file path starting from the current directory.

Uri and URL
What is uri:
Each type of resources available on the web-HTML documents, images, video clips, programs, etc.-is located by a universal resource identifier ("Uri.
A URI consists of three parts:
1. Resource Access naming mechanism.
2. Host Name for storing resources.
3. The name of the resource, represented by the path.
Note: Most people may be familiar with "url" instead of Uri. A URL is a subset of the URI naming mechanism.

What is URL:
URL is the abbreviation of uniform resource location ". Generally speaking, URL is a string used to describe information resources on the Internet. It is mainly used in various WWW client programs and server programs, especially the famous mosaic. URL can be used to describe various information resources in a unified format, including files, server addresses and directories.
The URL format consists of the following three parts:
The first part is the protocol (or service mode );
The second part is the Host IP address (sometimes including the port number) that contains the resource );
The third part is the specific address of the host resource ., Such as directories and file names.
The first part and the second part are separated by the ": //" symbol, and the second and third parts are separated by the "/" symbol. The first part and the second part are indispensable, and the third part can be omitted sometimes.
The biggest drawback of URL: When the storage location of information resources changes, the URL must be changed accordingly. Therefore, people are studying new information resource representation methods, such as Uri (Universal Resource Identifier), which is the "general resource identifier" (see RFC 1630), and urn (Uniform Resource Name) that is, "unified Resource Name" and URC (Uniform Resource citation) are "unified resource quote.

Reference: http://armstrongfei.bokee.com/viewdiary.11877246.html

 

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.