What happens every time we type a URL in our browser to open a web page? Or every time we request data from an API?
Well, the answer is that our browser, which is also called a client, sends a request to the server where the web page is hosted.

And the server will then send back a response, which is going to contain the web page that we just requested.
And this process is called the request-response model or also client-server architecture. This is what it's all about
Let's suppose that we want to enter an address

The Protocol https or http
The domain name, this can be said to be the address of the web page. It is easy to recognize and memorize (although it is not the real address).
The resource: in many cases it is the part of the web page that we are accessing.
The DNS
the dns is the one that takes care of this, by its name "Domain Name Server" it tries to convert or match the address of the wb page to the real ip address. Which happens through the internet service provider (ISP).
The real address
This is made up of the
- protocol : Like the previous address
- ip address :
- Port number: Note that the port number has nothing to do with the resource.
Once this is the real address, a TCP socket connection is established between the browser and the server and this makes the user and the server stay connected.
HTTP request and response

HTTP request message
At the beginning of this message is the most important part but do not ignore the others
- The "start line" (HTTP method+ request target+http version) which contains the HTTP method (there are many, the most important is GET to request data, POST to send data and PUT and PATCH to modify the data) which is used in the request then you have the request target which is the resource for example "/psga" or "/" which is the main or root page and the HTTP version.
- HTTP request headers
- Request body : In case we send data to the server, there will also be a request body containing the data, for example, coming from an HTML form.
As you may know there is the http and https and its main difference is that https is encrypted using TLS or SSL which are other protocols more
THE HTTP response message
This actually looks a lot like the request. Let's see:
- The start line: Here it sends the HTTP version back, the status code and a message, the HTTP response message. That is to say if it has been successful or not. From here comes the famous 404 (which means not found) or 200 ("OK").
- Response Headers: Here comes the response itself, there are many possibilities, we can even create our own
- Response Body: This is in most of the responses.
This is the whole idea, the server communicates with the client by sending data. So when the client receives the data the web site is presented in the browser (through a communication protocol).
TCP
TCP's job is to break requests and responses into thousands of tiny fragments called packets before they are established. Then, once they arrive at their destination, they join the original request or response to get the message to the destination as quickly as possible.
IP
the workings of the IP protocol over the Internet. that they should use IP addresses in every packet. of what really goes on behind the scenes of the web, of what you really need to become a great back-end developer. But I hope you still find this information useful]
static web site
this is when the developer sends the fully functional page to the web server. That is when nothing else is needed to run. Almost always the files are html,css and js and the only thing the browser does when it receives them is to show the web site.

dynamic web site
This is different from the dynamic web site, since it generally has a database from which you get the data you need to build the page. ThaBrot is to say from the database it gets the data to project them in a template (formed with html,css,js) after having them, it sends them to the browser so that it renders them. This process is called server-side rendering
