How it Works

To view a page on the World Wide Web, the user can either type the URL of the page directly into the browser's address box, or click on a hyperlink within a currently displayed page which points to the required page. The browser will first resolve the domain name within the URL to an IP address using the domain name system (DNS). The IP address will be needed by the Internet Protocol (IP) in order for IP datagrams to be addressed and correctly routed to the server. The browser then invokes the HTTP protocol, which creates an HTTP request packet containing the URL of the required Web page. The HTTP request packet is passed to the Transmission Control Protocol (TCP), which sets up the virtual connection to port 80 of the remote Web server and encapsulates the HTTP request packet in a TCP protocol data unit (PDU) that contains the appropriate connection parameters, including the source and destination port numbers. The TCP PDU then becomes the payload of an IP datagram, which also contains the source and destination IP addresses.

If the file referred to by the URL resides on the server, it will be sent to the browser process on the client computer. If not, an error message will be issued by the server and sent to the client as a dynamically generated Web page. The most common causes of this type of error are mistyped URLs, or the removal or change of location of a file, or even an entire Web site. URLs or hyperlinks that point to files than no longer exist or have been moved to a different location are called dead links. Assuming that the file does exist and can be retrieved, the markup it contains will be interpreted by the client browser. If references are made to style sheet files, script files, graphic image files, or other media content, these resources will also be retrieved from the server using further HTTP requests.

Once the Web page and all of the resources it references have been retrieved, the browser will display (or render) the content specified by the page in the browser window. Content is displayed according to the markup, style sheet information, and scripts that are applied to it. The time taken for the page to be retrieved from the server and displayed on screen is called the response time, and will be dependent upon both the speed of the connection and the total amount of data that must be downloaded before the page can be rendered. Ideally, response times should be no more than fractions of a second, although there are variables outside the control of content providers, service providers, or users that may cause delays, such as congestion on Internet links or a period of particularly heavy demand on the server's resources.