What you will learn
- Explain the roles of the browser, the server and DNS when a page loads
- Describe what an HTTP request and response contain
- Identify the HTML, CSS and JavaScript files behind a real web page
When you type an address such as example.com into a browser, the browser first needs the server's numeric IP address. It asks the Domain Name System (DNS), which works like a phone book for the internet. Once it has the address, the browser opens a connection to that server, usually over HTTPS so the traffic is encrypted, and sends a request for the page.
An HTTP request names a method and a path, for example GET /about, along with headers describing the browser and what it accepts. The server replies with a status code, such as 200 for success or 404 when nothing exists at that path, plus headers and a body. For a web page, that body is usually an HTML document.
The HTML file is only the start. As the browser reads it, it finds links to stylesheets, scripts, images and fonts, and requests each one. CSS controls how the page looks, and JavaScript adds behaviour. The browser combines all of these to build the page you see. Understanding this chain helps you work out why a page is slow or broken.


