-
Uniform Resource Identifier(URI), Uniform Resource Locator(URL), and Uniform Resource Name(URN)Web/Network 2020. 3. 29. 00:13
1. Overview
- URI (uniform resource identifier) identifies a resource (text document, image file, etc)
- URL (uniform resource locator) is a subset of the URIs that include a network location
- URN (uniform resource name) is a subset of URIs that include a name within a given space, but no location
2. Description
2.1 Uniform Resource Locator(URL)
URL contains information about how to fetch a resource from its location. URLs always start with a protocol(HTTP) and usually contain information such as the network hostname(example.com) and often a document path(/foo/mypage.html). URLs may have query parameters and fragment identifiers.
2.1.1 Example
- http://example.com/mypage.html
- ftp://example.com/download.zip
- mailto:user@example.com
- file:///home/user/file.txt
- http://example.com/resource?foo=bar#fragment
- /other/link.html (A relative URL, only useful in the context of another URL)
2.2 Uniform Resource Name(URN)
The URN identifies a resource by name. It always starts with the prefix urn:
URNs can identify ideas and concepts. They are not restricted to identifying documents. When a URN does represent a document, it can be translated into a URL by a "resolver". The document can then be downloaded from the URL.
2.2.1 Example
- urn:isbn:0451450523
- to identify a book by its ISBN number.
- urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66
- a globally unique identifier
- urn:publishing:book
- An XML namespace that identifies the document as a type of book.
2.3 Uniform Resource Identifier(URI)
URIs encompasses both URLs, URNs, and other ways to indicate a resource. An example of a URI that is neither a URL nor a URN would be a data URI such as data:, hello%20world. It is not a URL or URN because the URI contains the data. it neither names it nor tells you how to locate it over the network.
2.4 Uniform Resource Citations(URCs)
URCs that point to metadata about a document rather than to the document itself. A URC is another type of URI that is neither URL nor URN.
2.4.1 Example
An example of a URC would be an indicator for viewing the source code of a web page.
- view-source:http://example.com
3. Reference
'Web > Network' 카테고리의 다른 글
Classless Inter-Domain Routing(CIDR), Private, and Public IP (0) 2020.07.12 Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) (0) 2020.03.07 Transmission Types: Unicast, Multicast, Broadcast, and Anycast (0) 2020.03.07 HUB, Switch, and Router (0) 2020.03.07 Simplex, Half duplex, and Full duplex (0) 2020.03.07