The relationship and difference between URL, URI and URN

The relationship and difference between URL, URI and URN

URL

Uniform Resource Locator (URL) is a reference to a resource and a method of accessing it. It is commonly known as the URL, which is in the address bar of the browser.

A URL consists of the following different parts:

  • Protocol: usually https or http, a method of telling the browser or device how to access resources. Of course, there are other protocols, such as ftp, mailto, etc.
  • Next is ://
  • Hostname: A registered name (domain name) or IP address that represents an IP address, a numeric identifier used to identify a device connected to a network.
  • The port number, preceded by a colon:
  • Path: can refer to a file system path, usually used as a code segment
  • Parameters: optional query parameters starting with a question mark, where multiple parameters are connected with &
  • Hash: used to provide quick links to titles on a page, such as anchor links

URI

Similar to URL, Uniform Resource Identifier (URI) provides a method to identify resources. However, unlike URL, URI does not provide a method to locate the resource.

The most common form of URI is the Uniform Resource Locator (URL), often specified informally as a web address. From this, it can be seen that URI is a superset of URL, and every URL is essentially a URI.

URN

Uniform Resource Name (URN) is the historical name of Uniform Resource Identifier (URI), and URN is used as the URI scheme.

From the perspective of a set, URN and URL are both subsets of URI, as shown in the figure:

Taking a website as an example, the following clearly shows the contents of URI, URN, and URL, which can more intuitively reflect the relationship between the three:

To conceptually summarize the relationship between the three, as shown in the figure:

picture

<<:  Get started quickly and build a personalized Python GUI calculator in five minutes

>>:  Several steps and tools for troubleshooting the network

Recommend

10 Useful HTML File Upload Tips

[[351004]] The ability to upload files is a key r...

Summary information: Casbay/98 Cloud/Asia Cloud/Journey Cloud/PUAEX

I will continue to share some of the merchant sub...

The difference between SDN and traditional network operation and maintenance

1. Pain points of traditional network operation a...

What is a Computer Network Hub?

Quick definition: A computer network hub is a lay...

What is Open RAN?

Open RAN is an industry standard designed to powe...

How to create a new financing model for product-based IT

As technology departments move away from traditio...

【Funny story】An attack launched by a network cable

Not long after I entered college, I encountered a...