Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between URL and URI? [duplicate]

Tags:

url

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?

like image 536
Proud Member Avatar asked Nov 21 '10 19:11

Proud Member


People also ask

What is the difference between URI and URL?

URL and URI, both crucial concepts of the web, are terms that are often interchanged and used. However, they are not the same. The URI can represent both the URL and the URN of a resource, simultaneously, while URL can only specify the address of the resource on the internet.

What is the difference between URL and URI and URN?

Answer: URN, URL, and URI are all identifiers that help in locating a resource on the Internet. URN and URL are subsets of URI. URL gives the location or the address of the resource on the Internet, and the URN gives the name of the specific resource.

Is a URL also a URI?

URI is used to distinguish one resource from other regardless of the method used. URL provides the details about what type of protocol is to be used. URI doesn't contains the protocol specification. URL is a type of URI.

What is URI and URL in API testing?

Answer: URI is a resource identifier and it can identify any resource like a document, web page, image, book, etc. URL is a subset of URI and it identifies the resource by its location and also gives the mechanism to retrieve the resource from the location.


2 Answers

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 
like image 98
Ariejan Avatar answered Sep 20 '22 20:09

Ariejan


"URI stands for Universal Resource Identifier and URL stands for Universal Resource Locator. Often times people use the terms interchangably, which is not entirely correct. A URL is a subset of the URI popular protocols. These are protocols (http://, ftp://, mailto:). Therefore all URLs are URIs. The term URL is deprecated and the more correct term URI is used in technical documentation. All URIs are means to access a resource on the Internet and are a a technical short hand used to link to the resource. URIs always designate a method to access the resource and designate the specific resource to be accessed."- Source

like image 25
David Avatar answered Sep 21 '22 20:09

David