I. Basic Understanding of Web
This is the first day of my participation in Gwen Challenge
1. The HTTP protocol
- HTTP is a standard (TCP) for client end (user) and server end (Web site) requests and responses
2. A status code
- 1XX prompt message accepted the request requires further processing
- 2xx successfully accepted the request and processed normally
- The 3XX redirect accepts the request and needs to revisit another address to process it
- 4XX request error 404 403
- 5XX server error
3. Request and corresponding process
- Browser sends request
- The server accepts the request, processes it further, finds the function along the path, executes the function processing logic, and returns the corresponding content
- The content is returned in response to HTTP
4. Approach
Eight: get, post, head, options, trace, connect, delete, put
5. URL
HTTPS: port 443 HTTP: port 80
6. Request, response
Request: a data request sent by the browser to the server
Format:
“Request method path HTTP/1.1
K1=v1
K2=v2
Request body “-> GET The request has no request body
Response: A response from the server to the browser
“HTTP/1.1 Status code status description
K1=v1
K2=v2
Response body (Response data)
7. model
TCP/IP 5-layer model: application layer, transport layer, network layer, data link layer, physical layer OSI 7-layer model socket: a virtual layer between the application layer and transport layer, an interface C/S architecture (such as QQ software) B/S architecture (such as browser)Copy the code
8. Server Indicates the connection mode of the client
Baidu server Socket server 1. Socket server 2. Bind IP address and port 3. Listen to 4. Wait for connection 5. Accept connection 6. Receive data 7. Return data 8. Disconnect the browser socket client 5. Connect to baidu socket server 7. Send data 8. Receive data 9. Disconnect ` ` ` * * ` Web framework principle: https://www.cnblogs.com/maple-shaw/p/8862330.html ` * * [https://www.bootcss.com/] (front-end development framework) : CSS framework website front-end developmentCopy the code
www.jq22.com/:html Template website
Shortcuts (Chrome):
-
Ctrl+U: View the source of the web page
-
Ctrl+S: Directly download all images, CSS, JS of the current web page
Pycharm:
-
Ctrl + R: is replaced
-
Ctrl + f: lookup