URL to Page Load: The Complete Story

1. DNS Resolution: Finding the IP Address
The browser first checks its own DNS cache for the IP address of the requested URL.
If not found, it checks the operating system’s DNS cache.
If the OS also doesn't have the entry, the browser initiates a recursive DNS lookup using a DNS resolver (usually provided by the ISP or a public DNS like Google or Cloudflare).
2. Establishing a TCP Connection
After resolving the IP address, the browser establishes a TCP connection to the server using that IP.
Modern browsers use a persistent connection (via
keep-alive
) to reduce the overhead of repeatedly opening new connections.
3. SSL/TLS Handshake (for HTTPS)
If the protocol is HTTPS, a TLS/SSL handshake is performed:
Validates server identity via certificates.
Negotiates encryption methods.
Establishes an encrypted connection between the browser and the server.
4. Sending the HTTP Request
The browser compiles the request according to HTTP specifications.
Since the user just enters a URL, the browser fires an HTTP GET request to the server.
The request includes:
Headers: Metadata and instructions for the server (e.g.,
Accept
,User-Agent
,Host
, etc.).Cookies: (if any) are also sent.
Query parameters like
?q=home
to pass additional information.
5. Anatomy of the URL
Example:https://example.com/products/item?q=home
Scheme: Defines the protocol (e.g.,
https
)Domain: Human-readable address (e.g.,
example.com
)Path: Specific resource being requested (e.g.,
/products/item
)Query Parameters: Key-value pairs providing extra data (
?q=home
)
6.Receiving the Response
The server receives the HTTP request and parses it to understand the action required.
The server may:
Load a static file from disk.
Perform a database query and return dynamic content.
Return an error response (e.g.,
400 Bad Request
) if the request is malformed.
7. Rendering the Page
The browser receives the HTTP response, usually containing HTML.
The browser starts rendering the page, constructing the DOM tree.
8. Loading Additional Resources
As the HTML is parsed, the browser detects other resources:
JavaScript files
CSS stylesheets
Images and fonts
For each, a similar request cycle (DNS lookup → TCP → HTTP GET) is repeated if those resources are not cached.
Subscribe to my newsletter
Read articles from ROHIT SINGH directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

ROHIT SINGH
ROHIT SINGH
Passionate about learning new tecnlogies and tools and exploring the world of Technology.