DEV Community

Sandhya Steffy M
Sandhya Steffy M

Posted on

How a Request Originates from Client and Reaches the Server

Today, we use websites for everything like searching, watching videos, or shopping. But have you ever thought about what happens when we open a website? Let us understand this in a very simple way.

When a user opens a browser and types a website name like google.com, the process starts from the client side. The client is nothing but our device, like a laptop or mobile.

First, the browser does not understand the website name directly. It needs an IP address. So it asks the DNS (Domain Name System) to convert the website name into an IP address. This step is very important because computers communicate using numbers, not names.

After getting the IP address, the browser sends a request to the server. This request is sent using the internet. The request usually follows HTTP or HTTPS protocol.

Now the request reaches the server. The server is a system where the website data is stored. The server receives the request, processes it, and prepares the required response.

For example, if you searched for a webpage, the server finds that page and gets the data ready.

Then the server sends the response back to the client. This response contains the website content like text, images, and videos.

Finally, the browser receives this response and displays the webpage on the screen. All of this happens within a few seconds.

Top comments (0)