URI, URL 和 URN区别

参考:https://danielmiessler.com/study/url-uri/

 

URN:  A Uniform Resource Name,统一资源名称 ;eg.     ietf.org/rfc/rfc2396.txt(给定URI,我们仍无法访问该资源,因为我们不知道是在http协议还是ftp协议亦或者是其他协议)

URL:Uniform Resource Locator,统一资源定位符;eg.     http://www.ietf.org/rfc/rfc2396.txt  (可以定位资源的地址,即给定URL,我们就能找到这个资源)

URI:Uniform Resource Identifier,统一资源标识符。One can classify URIs as locators (URLs), or as names (URNs), or as both. A Uniform Resource Name (URN) functions like a person’s name, while a Uniform Resource Locator (URL) resembles that person’s street address. In other words: the URN defines an item’s identity, while the URL provides a method for finding it。即:URN和URL都是URI的子集. 所以任何的URN和URL都可以称之为URI。

 

Summary:

  1. URIs are identifiers, and that can mean name, location, or both.(URI既可以是资源名字,也可以是资源定位符,或者两者都是)
  2. All URNs and URLs are URIs, but the opposite is not true.(URN和URL都是URI,但反之不成立)
  3. The part that makes something a URL is the combination of the name and an access method, such as https://, or mailto:.(URL是由名字和访问方式(访问协议)组成的)
  4. All these bits are URIs, so saying that is always technically accurate, but if you are discussing something that’s both a full URL and a URI (which all URLs are), it’s best to call it a “URL” because it’s more specific.(专业来说,直接用URI总是正确的,但如果是属于URL范畴的URI,直接使用URL这种称呼会更精确,因为URL是一个更小集合。)

 

转载于:https://www.cnblogs.com/Daomy/p/9774660.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值