Difference between URL and URI?
Possible Duplicate:
What's the difference between a URI and a URL?
Just to get it right:
URI = Tells you in which hotel you should go to sleep.
URL = Tells you in which room in what hotel you should go to sleep.
So URL is a lot more specific, it points to a final destination. The thing you want. While URI is something strange.
So what exactly is URI when it's not an URL? What's the real difference?
URI: Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network (typically the World Wide Web) using specific protocols
URL: In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.
Example
To identify a specific resource and how to access it - in all completeness
URI: mysql://localhost@databasename:password
The URL shows you where you can find the database on the internet and which protocol you should use.
URL: mysql://localhost
“URI代表统一资源标识符(Universal Resource Identifier),URL代表统一资源定位符(Universal Resource Locator),通常人们可互换地使用术语,这并不完全正确,URL是URI流行协议的一个子集,它们是协议(http://,ftp ://,mailto :)。因此,所有的URL都是URI,术语URL是不推荐使用的,在技术文档中使用的术语URI更为正确。所有URI都是访问Internet上资源的手段,并且是一种技术手段链接到资源URIs总是指定一种方法来访问资源并指定要访问的特定资源。“ - 来源
这是一个URN,它可以识别一个物品而不给任何位置。
链接地址: http://www.djcxy.com/p/12100.html上一篇: URI和URL之间的区别
下一篇: URL和URI之间的区别?