URI与 URL的区别

摘自RFC 3986
URI, URL, and URN
A URI can be further classified as a locator, a name, or both.
URI 可以进一步分为定位器,定位名。
The term “Uniform Resource Locator” (URL) refers to the subset of URIs
术语“统一资源定位器”(URL)指的是URI中的一个子集。
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],
(URN)曾被使用于指明其是“urn”方案下的URI
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.
且指明其他URI的名称属性。
An individual scheme does not have to be classified as being just one of “name” or “locator”.
一个独立的方案不会分为单个名称或者单个定位器。
Instances of URIs from any given scheme may have the characteristics of names or locators or both,
一个给定方案的URI实例,可能有名称、定位器,或者两者都有,
often depending on the persistence and care in the assignment of identifiers by the naming authority,
通常取决于持续性和命名权限对标识的分配,
rather than on any quality of the scheme. Future specifications and related documentation
而不是在于方案的质量。未来的规范和相关文档
should use the general term “URI”
应该是使用通用的URI
rather than the more restrictive terms “URL” and “URN” [RFC3305].
,而不使用更多限制性的URL和URN。

公式:

URI = scheme “:” hier-part [ “?” query ] [ “#” fragment ]
hier-part = “//” authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

例子:

在这里插入图片描述
很显然,浏览器地址栏上所输入的地址,其实是URI而不叫URL,因为URI包含访问方式,比如是ftp://,http://,而URL没包含这些定义。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值