URI vs URL vs URN

URI - a string of characters for identifying a resource. A URI can be further classified as a locator (URL), a name (URN), or both.

<scheme>:<scheme-specific-part> (this syntax apply to any URI)

<scheme>://<authority><path>?<query> (this syntax apply to some of the URI)

URI that are hierarchical in nature use the slash "/" character for separating hierarchical components. "//" is for net path.

 

URL (locator) - a type of URI that's used to describe the location of a specific resource. A URL doesn't define the type of the resource to be found (text, image, movie, etc.), it only says where and how to find it.

RFC definition - 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.

protocal://computer(domain name or IP)/directories/file

http://www.igt.com/iplatform/index.html

file://localhost/home/readme.txt

file://localhost/c:/download/help.html

file:///c:/download/help.html

 

URN (name) - is a type of URI that uses the "urn" scheme. It is uniquely identify a resource irrespective of its stored location.

urn:isbn:04510523

urn:ietf:rfc:2668

RFC definition - 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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值