Home  >  Article  >  Web Front-end  >  Parse the difference and connection between URI and URL_Basic knowledge

Parse the difference and connection between URI and URL_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:13:061828browse

When I was looking at the STRUTS configuration today, I found a problem. When looking at the configuration file, sometimes a URL appeared and sometimes a URI. This puzzled me. I checked online, but the explanations were vague. , I simply summarize it myself. It only represents my personal understanding. Since my knowledge is really limited, there may be errors, but I think it should be like this.

The summary is as follows:

1. Abbreviation:
URI (uniform resource identifier) ​​uniform resource identifier;
URL (uniform resource location) uniform resource locator (or uniform resource locator);
URN (uniform resource name) unified resource naming.

2. Comparison of URI and URL

a.
URI is a relatively broader concept. URL is a type of URI and a subset of the URI naming mechanism. It can be said that URI It is abstract, but concretely uses URL to locate resources.

b.
Every resource on the Web, such as pictures, documents, videos, etc., is located by URI. The so-called positioning here refers to The resources on the web are stored in the specific path on the server relative to the host server.

c.
URL is a string used to describe information resource files on the Internet. It is used on client programs and servers to locate what the client needs to connect to the server. Information, which not only locates this information resource, but also defines how to find this resource.

3. My vernacular understanding
URI is a resource locating mechanism. It locates resources in a relatively general way and is not limited to clients and servers. URLs locate resources on the Internet. All resources, as long as they are online resources, have unique URLs.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn