From Browsers to Servers : The Journey of Your Data
Understanding the backbone of internet in best possible manner
Have you ever done all night chatting with your girlfriend😍?
If yes then most probably you all have been on a journey from “Hii, How are you?” to “Bye, Good Morning🌄” on any chatting application📱.
Have you ever try to find out that how much technology used there to carry forward your one emotion☺️from your house to her phone gifted by her ex-boyfriend 😰?
📣Lets find it out today…🤔
Its 10:00 PM at night 🌃 and like a loyal boyfriend you started missing your partner 👩 and now you want to talk to her. To complete this basic need of a human you open a browser 🌐 and typed facebook.com
Wallah!!! Now you can chat but wait…how?
How just by clicking few button you have changed the whole screen. How you opened a new page?
INVESTIGATION STARTED 🧐
Chapter 1 : Internet’s Phonebook ☎️
When your urge was on 7th sky and you entered the URL that is facebook.com in your language. We have to understand it that Mr. Browser cant understand our language.
So it will find something called the IP Address that tells the exactly which page you want to see in your computer window.
First it will think for a while in his memory🧠 (cache) to find out. Maybe he already knows about it or maybe not. If he knows then well and good otherwise he will open his phonebook The DNS 📞.
He will search in a DNS server where all the URL’s and their respective IP Address’s are available. Once Mr. Browser found the IP Address now he exactly know that on which page you want to go to meet your basic need.
Chapter 2 : Meeting with the Page (A Formal Handshake 🤝)
Hey! Your browser has found the IP Address. Now he wants to request for the web page you want but it doesn’t feel good to go and ask directly something from someone. So what will he do 🤔?
Just a greet with handshake but a special one TCP Handshake 🤝;
Here TCP stands for Transmission Control Protocol. Usually it gets completed in three steps so lets start…
Hey! 👋 : This is the first step called Synchronization (SYN). Its like the browser sending Hey! to the server to get started the communication.
Hey! - Hello! 🤙 : Congratulations! You got a respond as hello from the server. It was the second step seeking for acknowledgement so this is called Synchronization-Acknowledgement (SYN-ACK).
Hello! 🫶 : That’s very good. You have just send a hello message to accept the acknowledgement. Now this was the last and third step known as Acknowledgement (ACK).
Now your browser-server connection has been established. Now lets go fast because she is waiting 😉
Chapter 3: Requesting for Page to Server 🥺
Hey Buddy! Your browser is requesting web pages from server, pretty smart.
You wants a LogIn page of Facebook so he used the GET Method. Ya Ya he will use POST Method also but that will be used while sending the messages 😁.
Not only this, your browser will use also something called DELETE Method to delete the text if by chance you said the truth that you like her friend more 🤭, Mr. Browser is Smart.
With the Methods, browser also shares which path you want. Means if you want login page it will send (“/login”).
But Mr. Server wants some more information. He is asking something known as HEADERS 💆.
Don’t Panic Bro, Its nothing just User-Agent 🥷(Browser Name), Cookies 🍘(Any previous information from last visit) and some other formal information.
All Done… Wait for Server Response 🥱
Chapter 4: Waiting for Response 🧎➡️
After processing all the request the server will send the response.
The browser is expecting the response in some numeric code 🔢. (Bro’s think they are James Bond 🦸)
There is many code that server can response but the few popular ones are:
200 : OK ✅(All thing is Good)
404 : Page Not Found ❌(Your respective page is not available)
After the code the browser expects two more thing from server:
HEADERS 💆♂️- It includes the Content Type & Caching Instructions.
BODY 💪- It includes the main data. It could be your image, videos or the HTML file for web page.
Chapter 5: Sending Response to Screen 💻
After getting the response, the browser renders all the response on your screen. It could be any image, videos, PPTS, GIF’s or web-page file.
It renders the HTML page by something called DOM (Document Object Model) 🙄.
Chapter 6: Now Your Turn 🤗
It will close all the connection once all resources rendered successfully.
Now you have a login page of facebook on your computer screen. There you can just fill your UserID
and Password
and start chatting 💬.
By the way its not late to complete all the process. May be its just 10:01 PM 🕙😜
Conclusion 🧑🏫
We have completed our behind the scene journey from a browser to server with a happy ending. To conclude all we can say that there are few steps to connect from browser to server:
Internet’s Phonebook (DNS Connection)☎️
A Formal Handshake (TCP Handshake)🤝
Browser Requesting🥺
Server Responding😁
Rendering the Data📲
Hope you have enjoyed 😃 the blog. Please press the like ❤️ button to encourage me writing more blogs like this and click follow 🔔 button for future updates.