Introduction
When we open a website, we just click a link and the page loads. But behind the scenes, many steps happen. In this blog, I will explain in a simple way how a request goes from client to server.
What is Client and Server?
. Client-> Our device (laptop, mobile, browser)
. Server-> A computer that stores website data
Example: When we open Google, our browser is the client and Googleβs system is the server.
Step 1: User Enters URL
We type a website name like:
www.google.com
This is called a URL.
Step 2: DNS Lookup
The browser cannot understand names, it needs IP address.
So it asks Domain Name System (DNS) to convert the website name into IP address.
Step 3: Request Sent Over Internet
Now the client sends a request to the server using HTTP/HTTPS protocol.
. HTTP β not secure
. HTTPS β secure
Step 4: Traveling Through Network
The request does not go directly. It travels through:
. Routers
. Switches
. Internet
These devices help to find the best path.
Step 5: Server Receives Request
The server gets the request and processes it.
It may:
. Fetch data
. Run some code
. Access database
Step 6: Server Sends Response
After processing, server sends response back to client.
This response can be:
- HTML page
- Images
- Data
Step 7: Browser Displays Output
Finally, browser shows the website to the user.
So what we see is the final result of all these steps.
Simple Flow
User ->Browser -> DNS ->Internet ->Server ->Response-> Browser
Top comments (0)