Explain web request and http protocol

Learn step by step and record the growth and footprint of the editor. Friends who want to learn python can refer to the blog I wrote before.

Web request:
When we visit Baidu in f, there will be a web request. After we enter a URL, the browser will also send a request to Baidu's server. Baidu's server will return Baidu's html. When we search for other content on Baidu, The content is sent to the Baidu browser in the form of parameters. After Baidu browser receives it, it will continue the internal search according to the parameters. Find the content according to the parameter and sort it. Write the content of the parameter into html. Then return with the parameter content uniformly. (Feature: can be seen in the source code)
(ctrl+f: webpage search shortcut)
server rendering (collecting data and html on the server and returning to the browser process)
Insert picture description here
client rendering: when you request web content , Just give you a html skeleton, then the browser will request the server data, and then the server will give the data. The client splices the skeleton and data together. (Feature: you can't see it in the source code of the page, you need to use the browser capture tool to find the data: right-click to check or F12)
Insert picture description here
http protocol: (hypertext protocol: the content in html is hypertext)
every time we visit www, When xxxxxxx.com will automatically add http or https, it means that the url address follows the http protocol.
Protocol: The rules set up for communication between two computers.


1, request method, 2, status code
Insert picture description here



Common request sending (get, post)
get: display submission (usually used to view)
post: implicit submission (usually used to modify, add, upload server content)

Guess you like

Origin blog.csdn.net/weixin_47514459/article/details/114445855