Member-only story
How does the Website/Browser work?
Understand This Important Concept to Become a Better Web Developer.
The moment you enter a URL on a browser, these things happen behind the scene (see the above flow chart):
- The URL gets resolved by the DNS server
- A request is sent to the server of the website
- The response of the server is parsed
- The webpage is rendered (painted)
Step 1: The URL Gets Resolved — DNS Lookup
“DNS server” (where DNS = “Domain Name System”).
What does DNS server do is translate human-readable domains to IP addresses (the real address of a website). Domain => IP address.
Step 2: A Request Is Sent to the Server
A request is sent by the browser with the resolved IP address to the server.
![[screenshot-facebook-request-header.png]]
The server returns a so-called ‘response’, which could be an HTML file, images, CSS, script (js), etc.