Let's start with an example to give you a basic idea of these three nouns:
1?? Ftp://ftp.is.co.za/rfc/rfc1808.txt
2?? Http://www.cnblogs.com/nods/p/8985322.html#position
The two most common network addresses are listed above, and the two addresses are URIs.
The Ftp://ftp.is.co.za/rfc/rfc1808.txt and http://www.cnblogs.com/nods/p/8985322.html are URLs.
The Ftp.is.co.za/rfc/rfc1808.txt and www.cnblogs.com/nods/p/8985322.html#position are urns.
For 2?? For
http://is an agreement (at the bottom of the article, several patterns or protocols are commonly used).
Www.cnblogs.com/nods/p/8985322.html is the specific location of network resources.
#position is the resource.
The simple understanding is that the URL tells you exactly where the resource file is on the network, and the URN tells you where the resource is in the file.
URLs and urns are a subset of URIs, and the explanations above are very simple and popular explanations. The above two network addresses, all called URIs, but the URI but not only the representation of the above two, there are many other but the form.
URI English is all called Uniform Resource Identifier (Uniform Resource Identifier), which is a standard rather than a specific but expressive way of defining.
URL Uniform Resource Locator (Uniform Resource Locator), which is actually a resource identifier, but more specifically, it locates the location of the resource.
URN Uniform Resource Name (Uniform resource naming), used as a unique name for a specific content, is independent of the location of the current resource. With urns, you can move resources around without worrying about inaccessible after migration. The magnetic link used in peer-to-peer download is an implementation of a urn that can be persisted to identify a BT resource, which is stored in a peer-to-peer network without the need for a central server user to find and download it.
There is a special source for these three people:
These three acronyms are the Internet standard tracking protocol that Tim Berners-lee defines in a document called RFC 3986:uniform Resource Identifier (URI): Generic Syntax.
You can also find the relevant ins and outs in Https://en.wikipedia.org/wiki/Uniform_Resource_Identifier.
With the following example (from Wikipedia), we have a good understanding of the difference between a urn and a URL. If it is a person, we will think of his name and address.
A URL is similar to an address, and it tells you a way to look for a goal (in this case, find a person by street address). You know, the above definition is also a URI.
In contrast, we can think of a person's name as a urn, so a urn can be used to uniquely identify an entity . Because there may be a case of the same name (same surname), it is not quite appropriate to say more accurately the example of a person's name. What's more appropriate is the book's ISBN code and the serial number of the product within the system, although it doesn't tell you how or where to find the target, but you have enough information to retrieve it.
For the Web front end, focus on the URL, and the network protocol is the most important.
The most common patterns and protocols are as follows:
- http-Hypertext Transfer Protocol resources;
- https-Hypertext Transfer Protocol transmitted with Secure Sockets Layer;
- ftp-file Transfer Protocol;
- Mailto-e-mail address;
- file-Local computer or online sharing of documents;
- Telnet-telnet Agreement;
- idap-Lightweight Directory Access Protocol search;
- News-usenet News Group;
- Gopher-gopher protocol.
What is uri,url and urn, do you really understand?