Resolve the differences and connections between uris and urls

  • 2020-03-29 23:54:48
  • OfStack

Today when we watch the STRUTS configuration and found a problem, is looking at the configuration file, sometimes a URL is a URI, sometimes make me confused, the Internet and explanation are vague, simply summarize, represent only personal understanding, because my knowledge is limited, there may be a mistake, but I think should be like this.

The summary is as follows:

1. The abbreviations:
URI (uniform resource identifier) uniform resource identifier;
URL(uniform resource location) uniform resource locator (or uniform resource location);
URN is a uniform resource name.

2. Comparison of uris and urls

Uris are a relatively broad concept. A URL is a type of URI, a subset of the URI naming mechanism, so to say that a URI is abstract, but specifically USES a URL to locate a resource.

Every resource on the Web, such as pictures, documents, videos, etc., is located by the URI. The so-called location here refers to the specific path of the resource on the Web on the server relative to the host server.

The URL is a string on the Internet used to describe the information resource file, used on the client and server to locate the information needed by the client to connect to the server. It not only locates the information resource, but also defines how to find the resource.

My colloquial understanding
URI is a resource location mechanism, it is a relatively general location of the resources, not limited to the client and server, and the URL is located on the web all resources, as long as the resources on the web, there is a unique URL.

Related articles: