How a Web Page Reaches Your Screen
A browser finds an address for a hostname, requests content and processes the server's response to display a page. Saved addresses and cached resources can be reused. Servers can return stored files or generate responses.
What a learner can do afterwards
- Put the steps in order from pressing enter to a finished page
- Explain what the name lookup is for and what breaks without it
- Tell apart what the browser does from what the server does
1 · Read
For a page that is not cached, the browser reads the web address and finds an IP address for its hostname. It sends an HTTP request, receives a response and processes the content for display. More resources may need further requests. HTTP defines web requests and responses.
DNS can look up IP addresses for a site's hostname. A usable saved lookup result can avoid a fresh query. Without a saved address, failed lookup prevents contact by that hostname even if the server works. DNS returns address information, not page files. Successful lookup alone does not guarantee a page will load.
A server can return stored files or generate response content. HTML describes page content and structure. CSS controls presentation, including colours and layout. JavaScript runs code for page behaviour. The browser processes resources and displays the result. It can cache some resources, but does not permanently store every website.
A gateway is a server that passes a request to another server. HTTP 504 Gateway Timeout means it did not receive a timely response from an upstream server needed to complete the request. The gateway sends the 504 response. A browser's own waiting timeout is different.
Ping sends network test messages, not HTTP page requests. Destination Host Unreachable reports a delivery problem detected by the local computer or a router. It does not prove the test packet left the computer or the destination is switched off. Unlike 504, it is not an HTTP response.
Find an address, request content and process the response. Caches can reuse results. HTTP 504 comes from a gateway; a ping delivery error is a different kind of message.
The lesson, questions, worked solutions and flashcards about loading web pages and interpreting network errors were written for this dataset.
Four readings and six flashcards were written for this dataset. The video reference is Khan Academy's "HTTP and HTML". Video license terms have not been verified.
More to read
Content from a server
The browser is a web client. It requests resources from servers and processes the returned content. A server may read a stored file or generate content using a program.
HTML describes structure and content. CSS supplies presentation rules. JavaScript runs code for behaviour such as responding to actions. One page can need several requests, and the browser may begin displaying content before every resource arrives.
Cached resources can be reused. This does not make the cache a permanent copy of every website. Servers still supply new content, updates and generated responses.
A gateway's timeout
Some requests pass through a gateway that contacts another server. That other server is upstream from the gateway for this request.
HTTP 504 Gateway Timeout means the gateway did not receive a timely upstream response needed to complete the request. The gateway returns status 504 to the client. The status alone does not identify why the response was late.
A browser can also stop waiting and show its own connection error. That is different from receiving a 504 response. Do not disable security settings to investigate an error. Ask the person responsible for the network or website for help.
An address before a request
A hostname and a path serve different purposes. DNS can find IP addresses for the hostname. The path identifies a resource requested from the service; DNS does not fetch it.
A browser or operating system may already have a usable saved lookup result. A new DNS query may then be unnecessary. Without a usable saved address, failed lookup prevents contact by that hostname. A cached page may still be available in some situations.
Successful lookup is only one stage. The request must reach a server, and usable content must return. A failed page load alone does not identify DNS as the cause.
Reading a ping result
Ping uses network test messages to check reachability. It does not request a page using HTTP.
Destination Host Unreachable reports a delivery problem detected by the local computer or a router. The message does not prove the test packet left the computer. It also does not prove the destination is switched off. Connection and routing problems can produce the report.
Other ping results need care too. A missing reply may reflect blocked test traffic rather than an unavailable website. Treat tests as clues. Do not turn off firewalls or change routes without help from the person responsible for the network.
Explore more
2 · Watch
به انگلیسیTake it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.