URL (Uniform Resource Locator):
URL (Uniform Resource Locator) is often defined as a string of characters that is directed to an address. It is a very commonly used way to locate resources on the web. It provides a way to retrieve the presentation of the physical location by describing its network location or primary access mechanism.
The protocol is described within the URL which is employed to retrieve the resource and resource name. The URL contains http/https at the start if the resource may be a web type resource. Similarly, it begins with ftp if the resource may be a file and mailto if the resource is an email address. The syntax of an URL is shown below where the primary part is employed for protocol and the remainder of the part is employed for the resource which consists of a website name or program name.
Here, the domain name describes the server (web service) and program name (path to the directory and file on the server).
URI (Uniform Resource Identifier):
Similar to URL, URI (Uniform Resource Identifier) is also a string of characters that identifies a resource on the web either by using location, name or both. It allows uniform identification of the resources. A URI is additionally grouped as a locator, a name or both which suggests it can describe a URL, URN or both. The term identifier within the URI refers to the prominence of the resources, despite the technique used.
The former category in URI is URL, during which a protocol is employed to specify the accessing method of the resource and resource name is additionally laid out in the URL. A URL may be a non-persistent sort of the URI. A URN is required to exist globally unique and features a global scope.
Difference between URL and URI:
|URL is used to describe the identity of an item.||URI provides a technique for defining the identity of an item.|
|URL links a web page, a component of a web page or a program on a web page with the help of accessing methods like protocols.||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.||URI is the superset of URL.|
- Difference between RPC and RMI
- Difference between C and C#
- Difference between USB 2.0 and USB 3.0
- Difference between Blu-ray and DVD
- Difference between Tor and VPN
- Difference between H.323 and SIP
- Difference between CLI and GUI
- Difference between CD and DVD
- Difference between LAN, MAN and WAN
- Difference between LAN and MAN
- Difference between CPU and GPU
- Difference between CRT and LCD
- Difference between LED and LCD
- Web 1.0, Web 2.0 and Web 3.0 with their difference
- Difference between LAN and WAN
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.