URI URN URL区别联系

来自 RFC 3986的解释是:

 

A URI can be further classified as a locator, a name, or both. The term "Uniform Resource Locator" (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network "location"). The term "Uniform Resource Name" (URN) has been used historically to refer to both URIs under the "urn" scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.

 

URL : Uniform resource locator

URL由BoF及IETF在1994年创建。它的预发联合了domain names(created in 1985)与file path。

一开始是这种形式:http:com/example/www/path/to/name后来有调整成了http://www.example.com/path/to/name(这样domain name部分看起来更明确了?)。语法如下:

  scheme://domain:port/path?query_string#fragment_id

scheme部分定义了namespace,也限制了URL剩余部分的语法,常见的有http https ftp,其他不细说了。

 

URI  :  Uniform resource identifier

URN : Uniform resource Names

三者区别联系

URL是特殊的URI,标识一个可访问资源,提供访问机制(http、ftp...)及如何定位到

URN 并不保证资源的有效性,URN和URL有点类似与what 和 where的关系

URI 更大的概念,包括两者

 

 

 

 

参考:

What's the difference between a URI and a URL?

What is the difference between URI, URL and URN?

Uniform resource locator wiki

 

你可能感兴趣的:(Web)