定位和识别资源之间的区别在哪里?
可能的重复:
URI 和 URL 有什么区别?
有什么区别吗?我说的是用于识别的 URI,而不是用于定位的 URL。两者不是同一个东西吗?
Possible Duplicate:
What's the difference between a URI and a URL?
Is there any difference? I'm talking about URI for identifying, but URL for locating. Aren't both the same thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
它们可能看起来相同,但它们不是同一件事。 URL 标识可以通过某种协议(通常是 http)传输的内容。 URI,可用于标识名称空间(例如),但可能没有该地址中的任何内容。
They can look the same, but they're not the same thing. A URL identifies something that can be transferred over some protocol (often http). A URI, can be used to identify a namespace (for example) but there might not be any content at the address.
知道我是谁并不能告诉你任何关于我在哪里的信息。
Knowing who I am doesn't tell you anything about where I am.
URI 通过位置和/或名称来标识资源。我们大多数人常常使用 URI 来定义资源的位置。
URL 是 URI 的特化,它定义特定资源的网络位置。
通常,如果 URL 描述资源的位置和名称,则使用的术语是 URI。
A URI identifies a resource either by location, or a name, or both. More often than not, most of us use URIs that defines a location to a resource.
A URL is a specialization of URI that defines the network location of a specific resource.
Generally, if the URL describes both the location and name of a resource, the term to use is URI.
这篇文章可能会有所帮助:
URI 与 URL
摘录:
This article might help:
URI vs. URL
Excerpt:
标识符是某事物的唯一名称,因此我们可以确定我们谈论的是同一事物。例如,Atom 命名空间为 'http://www.w3.org/2005/Atom '。这是一个 URI。这并不意味着您可以将此 URI 放入浏览器中并在那里拥有一个文档(好吧,对于 Atom,是的,您有一个文档,但为了方便起见,它是 Atom 的简单表示,它不是 Atom 命名空间本身)。
URL 是文档的位置。这是您可以放入浏览器中的内容。令人困惑的是,两者都使用相同的格式(http://...),但这主要是轶事......
An identifier is a unique name for something, so we can be sure that we talk about the same thing. For example the Atom namespace is 'http://www.w3.org/2005/Atom'. This is a URI. This doesnt mean that you can put this URI in a browser and have a document there (well, in case of Atom, yes, you have a document, but it's a simple presentation of Atom for convenience, it's not the Atom namespace itself).
A URL is the location of a document. This is what you can put in your browser. It is confusing that both use the same format (http://...) but that is mostly annecdotic ...
URL 是 URI,不是 URN。 (参见)
A URL is a URI which is not a URN. (see)