The article is not systematic, purely as a concept analysis, only as notes.

URI: Uniform Resource Identifier specifies the Uniform Resource Identifier

A string identifying the name of an Internet resource that allows users to interact with any resource (local and Internet) over a specific protocol. A URI is defined by a scheme that includes a deterministic syntax and associated protocols.

The FORMAT of the URI consists of the URI protocol name (for example, HTTP, FTP, Mailto, file), a colon, and the corresponding content of the protocol. A particular protocol defines the syntax and semantics of the protocol content, and all protocols must follow certain general rules for URI grammar. URI grammas also impose additional restrictions on protocol content for a variety of reasons, such as ensuring interoperability between layered protocols. Percentage coding also provides additional information for urIs.

The format of a generic URI is as follows:

[Protocol]://[Username]:[password]@[host name]:[port]/[path]? [query parameter]#[fragment ID]

Note: The user name and password (user information), port, query parameters, and segment ID are optional.

Here are two examples of URIs and their components:

Hierarchical part ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ authority path ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌ ─ ─ ─ ┴ ─ ─ ─ ─ ┐  abc://username:[email protected]:123/path/data?key=value&key2=value2#fragid1└ ┬ ┘ └ ─ ─ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ─ ─ ┘ └ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ┘ └ ┬ ┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ └ ─ ─ ┬ ─ ─ ┘ scheme user information host port query fragments Urn: example: mammal: monotreme: echidna └ ┬ ┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ scheme pathCopy the code

URL: Uniform Resource Locator Uniform Resource Locator

A concrete URI, or URL, that can be used to identify a resource and also name how to locate the resource. Generally speaking, a URL is a string used to describe resources on the Internet. It identifies an Internet resource and specifies how to operate on it or obtain the resource. At present, the biggest disadvantage is that when the location of information resources changes, the URL must be changed accordingly.

URN: Uniform Resource Name Specifies the Uniform Resource Name

That is, resources are identified by name, independent of location, and may reduce the number of failed links. The ISBN system for identifying unique titles is a typical example of the use of URNs. For example, ISBN 0486275574(URN: ISBN :0-486-27557-4) irambiguously identifies a particular version of Shakespeare’s Play Romeo and Juliet.

URN is a URI that specifies a resource by name based on a namespace. URN allows one to point out a resource without having to indicate its location or how it was obtained. Resources do not need to be Internet-based. For example, URNurn:ISBN0-395-36341-1 specifies the URI that identifies the system (that is, the International Standard book number ISBN) and the unique representation of a resource in that system. It allows people to talk about the book without pointing out its location and how it was acquired.

Example:

  1. Urn: ISSN :1535-3613 (International Standard Journal Number)
  2. Urn: ISBN :9787115318893 (International Standard Book Number)

The difference between

A URI refers to a resource, a URL refers to locating a resource by address, and a URN refers to locating a resource by name. Urls and UrNs are subsets of URIs.

As shown in the figure:

Here’s an example:

Looking for a specific person: if by the address, that is, xx district, XX City, XX province… The owner of room XX in unit XX, which is the URL (locating resources by location); URN if you look for it by your ID number, it’s a person by their ID number, not their location.

Refer to the link

  • Uri-baidu Encyclopedia
  • Uniform Resource Identifier – Wikipedia