URI and URL

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.