The article continues to update, you can wechat search a “Golang white growth” first time to read, reply to [tutorial] get golang free video tutorial. GitHub, GitHub, GitHub, GitHub, GitHub
What is the URL
URL is a Uniform Resource Locator. The function is to tell the user the location of a resource on the Web. This resource can be an HTML page, a CSS document, an image, a cat slice, etc. The URL we requested above is cat slice
https://upos-sz-staticks3.bilivideo.com/cmaskboss/164203142_30_1.jpg
This can be subdivided into several parts.
- The partial
Whether the protocol part of the URL is HTTP or HTTPS is delimited with //. The above URL indicates that the web page uses HTTPS, while the above mentioned X-Cinema uses AN FTP download link.
- Domain name part
The domain name was Upos-sz-Staticks3.bilivideo.com, and the IP was resolved to the DNS server before the request was sent. If you already know the IP address, you can skip DNS resolution and use the IP address as the domain name.
- Port part
The domain name is sometimes followed by a port, separated from the domain name by:, the port is not a required part of a URL. When the url is http://, the default port is 80
When the url is https://, the default port is 443. You can omit the port number in both cases. The URL above actually omits port number 443.
- Virtual directory
From the first/to the last/of the domain name is the portion of the virtual directory. The virtual directory is also not a required part of the URL, which in this case is /cmaskboss/
- File name section
From the last/to the beginning of? So, is the filename part; If not? , is from the end of the domain name/to #, is the filename part; If not? And #, then from the end of the domain name/from the beginning to the end, is the filename part. The file name in this example is 164203142_30_1.jpg, and the file name is not a required part of a URL.
What is the URI
A URI stands for a Uniform Resource Identifier (URI) that identifies an Internet Resource name. This identity allows users to interact with any resource, both local and Internet, over a specific protocol. For example, 164203142_30_1.jpg in the URL above.
The difference between URLS and URIs
- URL:Uniform Resource Locator;
- URI: Uniform Resource Identifier;
There is a misconception that urIs are a subset of urls, but the reverse is true. A URL is a subset of a URI. Just a quick explanation. Suppose that URI is a resource, and “in dilyiba’s arms” indicates a location. If you want to find white, you can go to “In Dilyiba’s arms” to find white, and “in Dilyiba’s arms/white” is the URL we often refer to. And “in Dilyiba’s arms/white” (URL) is obviously a subset of “URI”, after all, “white” could also be “in Niuyifei’s arms/white” (other URL).