URI, URL, URN的概念和区分
2015-06-01 15:14
375 查看
URI, URL, URN的概念和区分
定义
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. [1]So all URLs are URIs (actually not quite - see below), and all URNs are URIs - but URNs and URLs are different, so you can’t say that all URIs are URLs.
Examples[1]
URL & URI
Roger PateThis is my name, which is an identifier. It is like a URI, but cannot be a URL, as it tells you nothing about my location or how to contact me. In this case it also happens to identify at least 5 other people in the USA alone.
4914 West Bay Street, Nassau, Bahamas
This is a locator, which is an identifier for that physical location. It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as “resident of..”. In this case it uniquely identifies me, but that would change if I get a roommate.
I say “like” because these examples do not follow the required syntax.
URN
My name, Roger Pate, could be like a URN (Uniform Resource Name), except those are much more regulated and intended to be unique across both space and time.Because I currently share this name with other people, it’s not globally unique and would not be appropriate as a URN. However, even if no other family used this name, I’m named after my paternal grandfather, so it still wouldn’t be unique across time. And even if that wasn’t the case, the possibility of naming my descendants after me make this unsuitable as a URN.
URNs are different from URLs in this rigid uniqueness constraint, even though they both share the syntax of URIs.
References
[1]http://stackoverflow.com/questions/176264/what-is-the-difference-between-a-uri-a-url-and-a-urn相关文章推荐
- java-用HttpURLConnection发送Http请求.
- VBScript 剪贴板抓取URL并在浏览器中打开
- 用vbs 实现从剪贴板中抓取一个 URL 然后在浏览器中打开该 Web 站点
- asp获取URL参数的几种方法分析总结[原创]_应用技巧_脚本之家
- zend framework框架中url大小写问题解决方法
- url decode problem 解决方法
- php url地址栏传中文乱码解决方法集合
- 探讨:parse url解析URL,返回其组成部分
- C#实现自动识别URL网址的方法
- C#自定义针对URL地址的处理类实例
- ASP让url的中文显示为编码
- JS使用ajax方法获取指定url的head信息中指定字段值的方法
- 关于URL中的特殊符号使用介绍
- JS来动态的修改url实现对url的增删查改
- js url传值中文乱码之解决之道
- Javascript URI 解析介绍
- 通过url查找a元素并点击
- 简单实例处理url特殊符号&处理(2种方法)
- 获取上一页面的URL和本页的URL的方法
- js闭包实现按秒计数