2.1: Browse Internet Resources
A URL is the resource location that the browser needs to find information. A URL is used to find a lot of resources to use and share on the Internet.
A URI is a more generic type of resource identifier whose subset consists of a URL and a two subset of urn URIs.
Difference:
URL: A resource is found by describing the location of the resource.
URN: The resource is identified by the name of the resource, regardless of location.
Url:
URL Introduction
URL: The first part (/HTTP) is a URL scheme that tells the Web client how to access the resource, where the URL description is to use the HTTP protocol.
URL: The second part (www.baidu.com) refers to the location of the server , which tells the Web client where the resource is located.
URL: The third part (/index.html) refers to the resource path , which indicates which specific local resource the request is on the server.
In addition to the HTTP protocol, you can use protocols to access
Mail: mailto:admin@qq.com
ftp:ftp://www.baidu.com/
Download Movie: Rtsp:www.youku.com/xxx/ctp_void
URL resource Naming method: Scenario://server location/path
Scenario: The scenario must begin with an alphabetic symbol, separated from the rest of the URL by the first ":" Symbol. The scheme name is case-independent.
2.2.2 Host and Port
Description: The host component identifies the host machine that can access resources on the Internet. The hostname (www.baidu.com) or IP address can be used to represent the host name
Www.baidu.com/index.html
180.149.131.98:80/index.html
The two examples above have access to the same host and resources.
The port component identifies that the server is listening on the network port, and the default port number is 80 for HTTP for the underlying TCP protocol.
HTTP Authoritative Guide reading notes (2)