I'm helping my 15-year-old son prepare for an apprenticeship interview in the UK. The interviewer asked him to explain how a web page gets text from a server. We understand this could mean the initial page load, when the browser receives HTML, or later updates where JavaScript requests additional text or data. What would be a clear, appropriately detailed way to explain it, and how much should he cover about DNS, HTTP, and browser rendering?
4 Answers
A concise interview answer could be: “The browser looks up the website’s address with DNS, sends an HTTP request to the server, and receives a response containing HTML. It parses that HTML and displays the text. JavaScript can then make further requests to retrieve or update content without loading the whole page again.”
Some text is delivered after the initial page loads. JavaScript running in the browser can send another HTTP request using APIs such as fetch, often asking for JSON or plain text. The script then adds the returned content to the page. For live updates, websites can also use technologies such as WebSockets or server-sent events, but a normal request and response is the basic idea.
Because the question is broad, he could explain that there are several layers rather than assuming there is only one interpretation. At the network level, information is sent as bits using agreed protocols. DNS finds the server, HTTP carries the request and response, and the browser interprets the returned HTML. If the page needs more information later, JavaScript can request it separately. Explaining the process in his own words and acknowledging the possible interpretations would show good reasoning.
A good high-level explanation is: the browser uses DNS to find the server’s IP address, opens a connection, and sends an HTTP request—usually a GET request—for a URL. The server processes that request and sends back an HTTP response containing a status code, headers, and a body. The body is often HTML containing the page’s text. The browser parses the HTML into a document structure, downloads related resources such as CSS and images, and renders the result on screen.

It’s also worth mentioning that the browser may use a cached copy, so it does not always need to download every resource again.