xml地图|网站地图|网站标签 [设为首页] [加入收藏]

区别URI和URL

  本身在看《图解HTTP》的时候,刚最初还对UPRADOI和UEvoqueL的界别不是太专一,越到后边越开采差异两个的要求性。

  匈牙利语文书档案:“A UTucsonI is a uniform resource identifier美高梅集团网址, while a URL is a uniform resource locator. Hence every URL is a URI, abstractly speaking, but not every URI is a URL. This is because there is another subcategory of URIs, uniform resource 澳门mgm4858集团登录网址,names (URNs), which name resources but do not specify how to locate them. The mailto, news, and isbn URIs shown above are examples of URNs.

The conceptual distinction between URIs and URLs is reflected in the differences between this class and the URLwww4858mgmcom, class.

An instance of this class represents a URI reference in the syntactic sense defined by RFC 2396. A URI may be either absolute or relative. A URI string is parsed according to the generic syntax without regard to the scheme, if any, that it specifies. No lookup of the host, if any, is performed, and no scheme-dependent stream handler is constructed. Equality, hashing, and comparison are defined strictly in terms of the character content of the instance. In other words, a URI instance is little more than a structured string that supports the syntactic, scheme-independent operations of comparison, normalization, resolution, and relativization.

An instance of the URL class, by contrast, represents the syntactic components of a URL together with some of the information required to access the resource that it describes. A URL must be absolute, that is, it must always specify a scheme. A URL string is parsed according to its scheme. A stream handler is always established for a URL, and in fact it is impossible to create a URL instance for a scheme for which no handler is available. Equality and hashing depend upon both the scheme and the Internet address of the host, if any; comparison is not defined. In other words, a URL is a structured string that supports the syntactic operation of resolution as well as the network I/O operations of looking up the host and opening a connection to the specified resource.”

  华语文书档案:"U福特ExplorerI 是统一财富标识符,而 UENVISIONL 是统一能源定位符。因而,笼统地说,各类 U奥迪Q7L 都以 U奥德赛I,但不必然各类 U大切诺基I 都是 ULX570L。那是因为 UCR-VI 还包罗二个子类,即联合营源名称 (U奥迪Q3N),它取名财富但不钦定怎么着定位能源。上边的 mailtonews 和 isbn URI 都是 URN 的示例。

ULANDI 和 U哈弗L 概念上的例外呈今后此类和 URL 类的两样中。

该类的实例代表由 凯雷德FC 2396 定义的语法意义上的叁个 UKugaI 援用。UEvoqueI 能够是纯属的,也得以是相对的。对 ULANDI 字符串依照一般语法实行剖释,不思量它所钦命的方案(假若有)不对主机(要是有)实行查找,也不组织信赖于方案的流管理程序。相等性、哈希计算以及相比较都严俊地依据实例的字符内容开展定义。换句话说,一个UEscortI 实例和贰个援救语法意义上的、重视于方案的可比、标准化、深入分析和相对化总计的布局化字符串差不离。

作为相比,URL 类的实例代表了 U凯雷德L 的语法组成部分以及拜谒它描述的能源所需的音信。UOdysseyL 必得是绝对的,即它必须始终钦点多少个方案。UWranglerL 字符串根据其方案实行剖判。日常会为 U福特ExplorerL 构造建设二个流管理程序,实际上不能为未提供管理程序的方案创建八个 U哈弗L 实例。相等性和哈希总结依赖于方案和主机的 Internet 地址(倘使有);没有概念比较。换句话说,UWranglerL 是一个组织化字符串,它帮忙深入分析的语法运算以及查找主机和开发到内定财富的连天之类的网络I/O 操作。

"

  以上是从官方文书档案对于U奥迪Q3I的批注中出现的,对于U福睿斯I、U凯雷德L、U路虎极光N的界别。轻巧地看,能够用一个表格来注解那三者的区别。

名词

特性

URI统一资源标识符

既可以相对地也可以绝对地标识一个资源的地址

URL统一资源定位符

是比URI更具体形式,只能是绝对地标识一个资源的地址

URN统一资源名称

只命名一个资源但不指定如何定位资源

  

  参照他事他说加以考察网站:

       

本文由美高梅集团网址发布于彩票竞彩-投注|代销,转载请注明出处:区别URI和URL

TAG标签:
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。