Introduction of the URL
You can’t mention urls without mentioning Tim Berners-Lee, the inventor of the World Wide Web, He invented the World Wide Web(WWW), which consists of Uniform Resource Locator(URL)+HyperText Transfer Protocol(HTTP)+Hyper Text Markup Language(HTML) consists of three parts. In the World Wide Web(WWW), Uniform Resource Locator(URL) is a Uniform Resource Locator, which refers to a network address.
The composition of the URL
URL format
The standard format of a UNIFIED resource locator is as follows: Protocol type :// Server address: port number/Resource level UNIX file path File name? Query string # anchor point
The full format of a UNIFIED resource locator is as follows: Protocol type :// Credentials required to access resources @ Server address: port number/Resource level UNIX file path File name? URL= Protocol + domain name or IP+ port number + path + query string + anchor
Random page https://zh.wikipedia.org:80/w/index.php?title=Special: as an example# anchor
Copy the code
- Protocol:
https://
- Domain name:
zh.wikipedia.org
- Port:
80
- Path:
/w/index.php
- Query parameters:
? Title =Special: random page
- Anchor:
# anchor
The URL key
agreement
- Represents the web page used by
HTTP
The agreement. inInternet
Can use a variety of protocols, such asHTTP
.FTP
And so on. inHTTP
The following “//” is the delimiter
IP
IP
What’s the address?IP
Address (English:IP Address
The full name:Internet Protocol Address
Internet Protocol address Internet Protocol address When the device is connected to the network, the device is assigned an IP address for identification. With IP addresses, devices can communicate with each other. Without IP addresses, we have no way of knowing which device is the sender and which is the receiver.The IP address
Divided intoIntranet
andThe network
- The network
The IP address
Get: As long as the router is connected to telecom’s server, the router will have oneIP networks outside
This is your address on the Internet. But if you reboot the router, then you havemay
Was reassigned an “extranet IP”, which means the router does not have oneFixed external IP address
- Intranet
The IP address
Get: The router creates an Intranet in your home, and devices within the Intranet use the IntranetIP
The format for the IP address is 192.168.xx.xxxo. Intranet
andThe network
The difference between:Network IP
It’s fixed, mobile wireless and computer wired IP addresses are different, andIntranet
andThe network
Isolated from each other, they are connected to each other through routers, in the life of people in the home computer mobile phone (Intranet) need to go throughCat (Modem)
To convert the signal of the line into a signal that the computer can understand and passThe router
The IP address of the extranet is used to transmit network information.- Special IP
127.0.0.1 indicates that you are 127.0.0.1/XXX. The file content can be directly accessed on the web page. Localhost You can specify your localhost/XXX through hosts. Files can be directly accessed from web pages. You can modify IP addresses through hosts. A customized IP address is 0.0.0.0, not 0.0.0.0, for any deviceCopy the code
- The network
The router
The router
function- A router has two IP addresses, an external IP address and an internal IP address
- Devices on the Intranet can access each other, but cannot directly access the Internet
- If an Intranet device wants to access the Internet, it must go through a router
- Devices on the extranet can access each other, but not your internal network
- If an extranet device wants to send content to the Intranet, it must also go through a router
- That is to say, the Intranet and the extranet are like two isolated Spaces, unable to communicate with each other, and the only connection is the router
- So routers are sometimes called gateways.
The domain name
- A domain name is an alternate name for an IP address, which is used to identify the computer’s electronic location (different locations across the country) as data is transmitted.
- The domain name system has layers
- The first level is the top-level domain, which includes the generic top-level domain, for example
.com
and.net
and.org
And the country and region top-level domains, for example.us
and.cn
and.tk
. - A second-level domain is a domain under a top-level domain name in the Internet DNS hierarchy. Example:
www.xiedaimala.com
www.xiedaimala.com
Is a three-level domain, commonly known as the second level domain name- Secondary domains and tertiary domains are parent-child relationships
- The first level is the top-level domain, which includes the generic top-level domain, for example
- use
ping
The command- in
Cmder
The use ofping
Command to query the domain nameIP
- Can also be used in
ip138.com
In the query
- in
IP
andThe domain name
Relationships (NDS
)
IP
andThe domain name
Is through theDNS
correspondNDS
As a distributed database that maps domain names and IP addresses to each other, it makes it easier for people to access the Internet.- Processes, such as
baidun.com
- The browser will ask the DNS eyetracker provided by Telecom or Unicom
baidun.com
What the correspondingIP
- Telecom yan tong will answer one
IP
- Then the browser will want to correspond
IP
the80/443
Port send request - The request is to view
baidun.com
The front page of
- The browser will ask the DNS eyetracker provided by Telecom or Unicom
- Note:
- The service is used
80
Port to providehttp
service - The service is used
443
Port to providehttps
service
- The service is used
nslookup
The queryDNS
nslookup
Commands are used to queryNDS
To check whether domain name resolution is normal and diagnose network problems when network faults occur
# nslookup + domain name nslookup domain [dns-server] ``` ``` nslookup xmasuhai.xyz ' 'Copy the code
portport
- A computer provides different services, each linked to a port
- A computer has a total of 65535 ports
- The HTTP service uses port 80
- 443 is best used for HTTPS services
- Port 21 is recommended for the FTP service
- Wikipedia query port list of services corresponding to the port
- Port rules: Ports 0 to 1023 are reserved for use by the system. You can use these ports only after you have administrator rights. Other ports can be used by common users.
IP
andport
One is indispensable, and the problem must lie in between.
The path
/w/index.php
The path of a resource on a network server. The path indicates which web page to visit
Query string
? Title =Special: random page
Represents the page display content, section, chapter, page, or query keywords, through# anchor
Query the word you want to look up.- Important note
- An anchor represents a “bookmark” in a resource that gives the browser the direction of the content at that “bookmarked” location.
- On the HTML document, the browser will scroll to the bit that defines the anchor point on the video or audio document, and the browser will try to go to the time represented by the anchor
- The fragment is never sent to the server, the anchor is eaten by the browser, the anchor is only relevant to the browser, there is no need to send it to the server
URL page request
-
How do I request different pages
- With path
https://developer.mozilla.org/zh-CN/docs/Web/HTML https://developer.mozilla.org/zh-CN/docs/Web/CSS Copy the code
- tool
- Use the Chrome Developer Tools Network panel to see the difference
-
Same page, different content
- Use query parameters
https://xxx.com/s?wd=hello https://www.baidu.com/s?wd=hi https://www.baidu.com/s?wd=hello Copy the code
-
Same content (page), different location
- With the anchor
https://developer.mozilla.org/zh-CN/docs/Web/CSS# reference books https://developer.mozilla.org/zh-CN/docs/Web/CSS# tutorial Copy the code
- An anchor is a location within a document
-
Note:
- The anchor appears to have Chinese, but does not support Chinese
#
The reference books will become#%E5%8F%82%E8%80%83%E4%B9%A6
- The anchor point is not transmitted to the server, so it is not available
Network
I saw it on the panel
This article refers to the internal curriculum of Hungry Man Valley