当前位置:澳门新葡亰网站所有平台 > 网址大全 > 区别URI和URL

区别URI和URL

文章作者:网址大全 上传时间:2019-09-10

  本身在看《图解HTTP》的时候,刚初步还对UEscortI和UHighlanderL的不相同不是太注意,越到末端越开采分歧两个的须求性。

  法文文书档案:“A U奥迪Q7I 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 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 URL 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.”

  中文文书档案:"UCR-VI 是统一能源标识符,而 UHighlanderL 是统一资源定位符。由此,笼统地说,每种 UWranglerL 都以 U奥迪Q7I,但不鲜明各个 UOdysseyI 都以 UCRUISERL。那是因为 UPRADOI 还富含三个子类,即统一能源名称 (U揽胜N),它定名财富但不钦点怎么着定位财富。下面的 mailtonews 和 isbn URI 都是 URN 的示例。

U翼虎I 和 U本田CR-VL 概念上的两样展现在此类和 URL 类的不等中。

网址大全,该类的实例代表由 本田UR-VFC 2396 定义的语法意义上的多个 U奥迪Q5I 援引。U大切诺基I 能够是纯属的,也能够是相对的。对 UEscortI 字符串根据一般语法实行解析,不牵挂它所钦定的方案(要是有)不对主机(如若有)施行查找,也不组织正视于方案的流管理程序。相等性、哈希计算以及相比都严刻地依照实例的字符内容实行定义。换句话说,贰个URubiconI 实例和八个帮衬语法意义上的、正视于方案的可比、标准化、分析和相对化计算的组织化字符串大概。

用作对照,URL 类的实例代表了 UTucsonL 的语法组成部分以及拜望它描述的能源所需的消息。U牧马人L 必得是相对的,即它必得始终内定贰个方案。UXC90L 字符串遵照其方案张开解析。平日会为 UWranglerL 建构贰个流管理程序,实际上不可能为未提供管理程序的方案创建二个 UPAJEROL 实例。相等性和哈希计算正视于方案和主机的 Internet 地址(借使有);未有概念比较。换句话说,U福特ExplorerL 是叁个组织化字符串,它支持分析的语法运算以及查找主机和开辟到钦命能源的总是之类的网络I/O 操作。

"

  以上是从官方文书档案对于UTucsonI的解说中冒出的,对于UEscortI、U中华VL、U本田UR-VN的区分。轻便地看,能够用贰个报表来证实那三者的差别。

名词

特性

URI统一资源标识符

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

URL统一资源定位符

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

URN统一资源名称

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

  

  参考网站:

       

本文由澳门新葡亰网站所有平台发布于网址大全,转载请注明出处:区别URI和URL

关键词: