URI = Universal Resource Identifier
URL = Universal Resource Locator
The Uniform Resource Identifier URI is the ability to uniquely identify a resource under a certain rule .
Take the example, assuming that all the names of the world can not be repeated, then the name is an instance of the URI, the name of the string can be identified by the unique person.
In reality, the name of course will be repeated, so the ID number is the URI, through the social Security number can let us can and only to identify a person.
What is the Uniform Resource Locator URL? Also take the example and then the HTTP URL to do an analogy, you can have:
Animal Address agreement://Earth/China/Zhejiang/hangzhou/West L. District/A university/No. 14th Dormitory/No. 525 bed/Zhang San. People
As you can see, this string also identifies the only person that acts as a URI, so the URL is a subset of the URI. A URL is one that uniquely identifies a person by its location.
In the above we can only identify a person with a social security number. For this Zhang San in Hangzhou, we can also use: ID Number: 123456789来 identify him.
So whether in the way of positioning or numbering, we can only identify a person, is an implementation of the URL, and the URL is the way to implement the URI.
Back to the web, assuming that all HTML documents have unique numbers, remember that html:xxxxx,xxxxx is a string of numbers, the ID number of an HTML document, which uniquely identifies an HTML document, then the number is a URI.
A URL is a URI that is implemented by describing the file on which path on the host is the only way to determine a resource, that is, the location.
For the current URL I prefer to call it URL, after all, it provides the location of resources information, if one day the URL by the number to identify into the/ http741236985.html , it would be more appropriate to call it a URI, but it would have to find a way to locate the resource ... Transferred from: https://www.zhihu.com/question/21950864/answer/154309494
What is the difference between a URI and a URL in an HTTP protocol?