开发者

Difference between URI and URL [duplicate]

This question already has answers here: 开发者_开发知识库 Closed 12 years ago.

Possible Duplicate:

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

How are URI and URL distinguished?


A URL is a type of URI.

Having said that, most people use the two terms interchangeably.

From wikipedia (URL):

In computing, a Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

So, a URI identifies a resource (acts as its ID), a URL specifies the resource location.


URI - Uniform Resource Identifier

URL - Uniform Resource Locator

A URI identifies a resource by meta-information of any kind.

A URL locates a resource on the net, which means if you have a URL and the appropriate protocol you can retrieve the resource.

One characteristic of a URI is, that it gives information about exactly one resource. Another is there can be more than one URI describing the same resource.


From RFC 2396 here, I quote

   A URI can be further classified as a locator, a name, or both.  

   The term "Uniform Resource Locator" (URL) refers to the subset of URI
   that identify resources via a representation of their primary access
   mechanism (e.g., their network "location"), rather than identifying
   the resource by name or by some other attribute(s) of that resource.

   The term "Uniform Resource Name" (URN) refers to the subset of URI
   that are required to remain globally unique and persistent even when
   the resource ceases to exist or becomes unavailable.


As Oded says, URL is a type of URI.

A quick google turns up the following complete answer:

http://www.bernzilla.com/item.php?id=100

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜