The journey of data, From Browser to Server.

How Data flow works .

! Have you ever wondered how our data transfers from the browser to the server and then to another server? If yes, well, good, and if not, no problem. Here, we will discuss the journey of our data.

What is data ?

Before we dive into the journey of data, let's first understand what data means. Simply put, data is information related to anything, whether living or non-living.

Example: Let's assume you went shopping in a mall and bought some goods. In return, you paid and got a bill. One day, you want to calculate how much you spent that day. For that, you can calculate your expenses using the bill without needing to visit the store or search for the goods to calculate all the expenses. That's how data makes life easy.

The journey of data .

We will understand this in a very simple way with a real-life example, without diving deep into technical words.

Step1: Searching on Browser

Let a user named Bob use a browser to try to find a world map (just imagine your father asks you to bring a world map from the market—here your father is a user, you are a browser, the market is the server, and the shop is the database). So, in the first step, Bob initiates a request by entering a URL, clicking a link, or submitting a form.

Then browser construct any http request which includes

  • The URL. // your father call you

  • Method (GET, POST, etc.). // this fancy words nothing just like your father gives order .

  • Headers (e.g., cookies, user agent). // Your needs like how will you go and where

Step2: Looking for Addresses

Just like you're thinking about where to go and search for a stationery shop, similarly, the browser looks for DNS (Domain Name System) and IP address. This helps to connect a network between the browser and the server.

Step 3: Establishing connection between browser and server.

In this step, the server establishes a TCP (Transfer Control Protocol) connection to acknowledge the user's request and confirm their requirements, like when you find the shop, ask for the world map, and check if the map is correct by asking your father.

Step 4 : Send request.

Now the browser sends the HTTP request to the server through the established network and then processes it, just like you walk to the market and look for the stationery shop.

Step5 : Server Looking for the requested data.

Now the server looks into its database to find the legitimate data requested by the browser, You found the stationery shop and asked the shopkeeper for the world map, and the shopkeeper searches for the map in his shop.

Step6 : Giving response to the browser by server.

After finding the data, the server passes it to the browser on the same network. The browser then processes it, and the page is re-rendered and displayed to the user.

Like once the shopkeeper finds the map, he passes it to you, and then you go back to your father and give him the world map. This way, the process ends.