Abstract:

  1. Introduction of the URL
  2. IP
  3. port
  4. The domain name
  5. Path, query parameters, anchor points

1. The URL

  • Uniform Resource Locator (URL); URL, or URL address, is the address of a standard resource on the Internet, just like a door plate on the network. It was originally invented by Tim Berners-Lee as the address for the World Wide Web.
  • URL format:

[Protocol type] :// [IP or domain name] : [port number] / [path] File name? [query parameter] # [anchor point]

  • Most Web browsers do not require users to enter the “HTTPS: //” part because the vast majority of web content is hypertext Transfer protocol files.
  • “80” is a common port number for hypertext transfer protocol files, so it is not necessary to specify it.

2. IP (Internet Protocol)

1) the role

(1) How do conventions locate a device? (2) How do conventions encapsulate data packets to communicate with other devices

2) classification

The external network and the internal network are isolated from each other. The only connection point is the router. The IP address of the router is classified into the external IP address and the internal IP address.

3) Several special IP addresses

② you can specify yourself (localhost) ③ 0.0.0.0 in the Windows(C:) > Windows > System32 > drivers > etc > hosts file Does not represent any device

3. The port

1) concept

A device can provide different services, and different services use different ports.

  • Provides HTTP services. Port 80 is used by default
  • The HTTPS service is provided. Port 443 is used by default
  • The FTP service is provided. Port 21 is used by default

See Wikipedia for more

2) Port number rules

  • 0 to 1023 This parameter is used by the system. Only administrators can use this parameter
  • If one port is occupied, only another port can be used

Both IP and port are indispensable

4. The domain name

1) concept

A domain name is an alternate name for an IP address.

  • One domain name can correspond to multiple IP addresses → “Load Balancing”
  • One IP address can correspond to multiple domain names → “Shared Host”

2) The domain name and IP address are matched through DNS

Domain Name System (DNS) Enter the Domain Name in the address bar → The browser requests the IP address corresponding to the Domain Name from the DNS server provided by the service provider → responds to the IP address → the browser requests the port of this IP address to view the web page

3) View IP address commands by domain name

① Ping baidu.com tests the connectivity between the server and the local host and returns an IP address of the server serving the local area. ②nslookup baidu.com searches for the IP address of the domain name and returns the IP addresses of all servers providing services

4) Domain names at all levels

  • Com, cn Top-level domain name
  • Xiedaimala. Com Level 2 domain name
  • www. xiedaimala. Com
  • The prefixes WWW. With and without denote different domain names, and are not associated.

5. Path, query parameters, and anchor points

  • Path: Request different pages
  • Query: View different contents on the same page
  • Anchor point: View the same content in different locations

Note: Anchors do not actually support Chinese (they automatically become strings) and are not visible in the Developer tools Network panel.