This is the 4th day of my participation in the August More Text Challenge

This article introduced the concepts and differences between URIs and urls.

1 URI Unified resource Identifier (URI)

A Uniform Resource Identifier (URI) is a Uniform Resource Identifier (URI). RFC2396 defines these three words as follows:

  1. Uniform: A Uniform format makes it easy to handle many different types of resources without having to identify specific access methods for resources based on context. It is also easier to join new protocol schemes such as HTTP: or FTP:.
  2. Resource: A Resource is defined as “anything identifiable”. All can be used as resources except for documents, images, or services (such as the weather forecast for the day) that can be distinguished from other types. In addition, resources can be not only a single, but also a collection of many.
  3. Identifier: Indicates an identifiable object. Also called identifiers.

In summary, a URI is a location identifier for a resource represented by a protocol scheme. A protocol scheme is the name of the protocol type used to access resources. If HTTP is used, the protocol scheme is HTTP. In addition, there are FTP, Mailto, Telnet, file, etc. There are about 30 standard URI protocol schemes, which are Assigned by ICANN (Internet Corporation for Assigned Names and Numbers, Internet Assigned Numbers Authority (IANA) manages and promulgates the Internet Assigned Numbers Authority.

Uris can be divided into the following parts:

  1. URIUniversal Resource Identifier:
    1. A URI is a compact string that identifies an abstract or physical resource through which a unique resource can be accessed.
    2. The “resource” here refers to every resource available on the Web, such as HTML documents, images, video clips, programs, etc., which can all be identified by a unique URI string, with specific identification rules determined by us. In reality, a resource can be analogous to a unique person, animal, or object, and a URI is analogous to an ID card or DNA (unique anyway, it can make any rule).
  2. URL: Universal Resource Locator: Universal Resource Locator
    1. URL A string that identifies a resource by location. It is currently the main access mechanism for network resources.
    2. A standard URL must include: protocol, host, port, path, parameter, anchor, for example, animal address protocol :// Earth/China/Zhejiang/Hangzhou/Xihu/a university/Dormitory building 14 / Dormitory 525 / Zhang SAN. People, so that the resource can be located by its location.
    3. A URL identifies a resource by location, so it is a subset of a URI, or an implementation of a URI!
  3. URN: Universal Resource Name: Universal Resource Name
    1. Resources are identified by a unique name or ID in a particular namespace. The ID card, DNA is similar to a URN.

2 URL Unified resource locator

A URI identifies an Internet resource as a string, and a URL represents the resource’s location (its location on the Internet).

A URL is a concrete URI, a subset of a URI, that not only uniquely identifies a resource, but also provides information to locate that resource. The relative URL is the URL specified from the base URI in the browser.

In reality, of course, names repeat themselves, so the ID number is a URI (or URN) that allows us to identify a person, and only one. A URI (URN) is the equivalent of each person’s ID number, 123456789. A URL is where the Courier finds you, as follows:

Animal Address Agreement :// Earth/China/Hangzhou/Zhejiang province/Xihu District/some university/Dormitory Building no.14 / Dormitory No.525 / Zhang SAN. People.

As you can see, this string also identifies a unique person and acts as a URI, so the URL is a subset of the URI. A URL uniquely identifies a person by describing their location.

So we can uniquely identify a person either by location or by numbering, which is an implementation of a URl, and a URl is a URI implemented by location.

If you need to communicate, or the article is wrong, please leave a message directly. In addition, I hope to like, collect, pay attention to, I will continue to update a variety of Java learning blog!