URL和URI有什么区别 [英] What is difference between URL and URI

查看:86
本文介绍了URL和URI有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我对此感到困惑.任何人都可以帮助我.

Hi Guys, I have lot of confusion about those. any one help me.

推荐答案

URI

URI通过位置或名称标识资源.通常,我们大多数人都使用URI来定义资源的位置.但是,URI不必指定特定表示形式的位置.他们使用W3C URI作为其家庭图像的示例,并使用以下URI: http://www.w3.org/Icons/w3c_home [ ^ ].请注意,没有文件扩展名. w3c_home图像的URI仍然是通用的,但是它没有指定图像的特定表示形式(GIF,PNG或JPG).表示的选择可以由Web服务器通过HTTP内容协商确定. Apache HTTPD服务器多年来一直对内容协商提供出色的支持.奇怪的是,很少有站点可以利用HTTP内容协商. W3C是一个Web应用程序,它大量使用URI和内容协商.

网址

URL是URI,但URI不是URL. URL是URI的一种特殊形式,它定义了给定资源的特定表示形式的网络位置.以相同的W3C示例为例,w3c_home资源实际上有两种表示形式:

http://www.w3.org/Icons/w3c_home.gif [ http://www.w3.org/Icons/w3c_home.png [ http ://www.w3.org/Icons/w3c_home [ ^ ].

URI通常是指WWW上资源位置时使用的正确术语.
URI

A URI identifies a resource either by location or name. More often than not, most of us use URIs that defines a location to a resource. However, a URI does not have to specify the location of a specific representation. Citing and example of a W3C URI for their home image, they use the following URI: http://www.w3.org/Icons/w3c_home[^]. Note the absence of a file extension. The URI for the w3c_home image is still universally unique, but it does not specify the specific representation of the image (either a GIF, PNG, or JPG). The selection of the representation can be determined by the web server through HTTP content negotiation. The Apache HTTPD server has had excellent support for content negotiation for many years. Oddly, few sites take advantage of HTTP content negotiation. The W3C is one web application that makes heavy use of URIs and content negotiation.

URL

A URL is a URI but a URI is not a URL. A URL is a specialization of URI that defines the network location of a specific representation for a given resource. Taking the same W3C example, there are actually 2 representations available for the w3c_home resource:

http://www.w3.org/Icons/w3c_home.gif[^]
http://www.w3.org/Icons/w3c_home.png[^]

These URIs also define the file extension that indicates what content type is available at the URL. Through content negotiation, the web server will forward the user agent to the proper type, depending on the client’s capabilities, when the URI http://www.w3.org/Icons/w3c_home[^] is accessed.

More often than not, URI is the correct term to use when referring to the location of resources on the WWW.


您是否看过

URI:-
URI标识资源.它是一个定位器.它包括URI方案,权限,路径,查询和语法片段.例如,http:是URI方案.
网址:-
术语统一资源定位符"(URL)指的是URI的子集,除了标识资源外,它还通过描述资源的主要访问机制(例如,其网络位置")提供了一种定位资源的方法. />
有关更多信息,请使用Google.
祝你好运.
URI:-
An URI identifies a resource. It is a locator. It includes a URI scheme, authority, path, query and fragment by syntax. For example, http: is a URI scheme.
URL:-
The term "Uniform Resource Locator" (URL) refers to the subset of URIs 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").

And for more please use Google.
Good luck.


这篇关于URL和URI有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆