Inside the Browser

💻 Computers & the Internet · Lesson 37 of 50 · about 6 minutes

Advertisement

← Akademi · 💻 Computers & the Internet · Lesson 37 of 50 · about 6 min

Press Enter and your browser runs a pipeline. It checks its cache for the DNS answer; failing that asks the recursive resolver. With an address in hand it opens a TCP connection, then for HTTPS performs the TLS handshake — verifying the site’s certificate chain (issued by certificate authorities whose roots your browser ships with) and agreeing on encryption keys. Then, and only then, it asks for the page: HTTP GET, status back — 200 found, 404 missing, 301 moved — followed by the HTML.

The HTML is a construction order, not a picture: the browser parses it into a tree, fetches every referenced script, stylesheet and image — discovering more requests as it goes — and paints. Scripts can block the layout like workmen arguing in a doorway, which is why “defer” and smaller images decide whether a page feels fast more than servers do. Every element you see on this page passed that funnel; a “laggy” website is usually a heavy one, not a distant one.

State is the final trick: HTTP itself forgets you between requests — every page load is an amnesia — so the browser carries identity: cookies (small labelled tokens the server re-reads on each visit, for login sessions and preferences), localStorage (bulkier notes the server never sees), and cache (copies of assets so revisits paint without re-downloading). Privacy-wise the honest framing: cookies enable both “stay signed in” and “be followed across sites”; the modern browser now quarantines the second use by default.

Key takeaways

  • HTTPS = address lookup, connection, certificate verification, key agreement — before any content
  • HTML is a build order; scripts and images are discovered and fetched as it parses
  • HTTP forgets you every request; cookies and localStorage are the browser’s memory

Check yourself

A hard refresh (bypassing cache) forces the browser to re-fetch:

Go deeper

Advertisement
Advertisement