Background
The project needs to construct a URI Scheme for itself, but does not know what the URI is and how the scheme is named, so the following information is found.
Information
The URL is very well understood, because it is common to locate Web resources on the Internet, such as an image on the Web, an MP3, or an address for a H5 page.
Example: Http://www.baidu.com/img/bdlogo.png
The URI and URL are not identical and are defined as follows
Uri:uniform Resource Identifier Uniform Resource Identifier
Url:uniform Resource Locator Uniform Resource Locator
Wikipedia:
The most common form's URI is the Uniform Resource Locator (URL)
So the URL is a subset of the URI
A URI is a resource locator and is not necessarily on the network, it can be on your local computer.
Example:
https://example.org/absolute/URI/with/absolute/path/to/resource.txtftp://example.org/resource.txted2k://|file| %5bmac%e7%89%88%e6%9e%81%e5%9
URI scheme is a specification, so it can be called URI scheme in accordance with its specifications, so we can also design our own scheme.
scheme: [//[user:[email protected]]domain[:p ort]][/] Path[? Query][#fragment]
Or
<scheme name>:
<scheme name>:scheme name, for the above 3 scheme, their scheme name is HTTP, FTP, ED2K (Electric Donkey Protocol)
<query>: Query fields, usually key-value pairs, reference URLs are known
<fragment>: Optional field, often seen in the Web page used to go back to the top.
On how scheme is named, Wikipedia says
The scheme consists of a sequence of characters beginning with a letter and followed by any combination of s, digits, plus ( +
), period ( .
), or hyphen ( -
). Although schemes is case-insensitive, the canonical form was lowercase and documents that specify schemes must lowercase letters.
URI and URL