The World Wide Web stands out as a highly favoured application that operates over the Internet. It encompasses two main types of software: web browsers and web servers. Any device connected to the Internet can run either a web browser, a web server, or both simultaneously. Web servers store files known as web pages. When a user wants to access a specific page, they can do so by entering its address—known as its URL (Uniform Resource Locator)—into the designated text field in their browser or by clicking on a hyperlink.
Once the user makes this request, the browser communicates with the relevant web server to fetch the desired page. In response, the server sends back the requested content. These web pages are crafted using HTML (HyperText Markup Language), which is a text-based coding language. The browser then decodes this HTML to present an interactive graphical representation of the page on the user’s screen.
Take Western Carolina University as an example: nearly every computer there runs some form of web browser. Netscape Navigator and Microsoft Internet Explorer are trendy choices. The university’s primary web server operates on cowee.wcu.edu, which is also accessible via its alias www.wcu.edu. Yet several other servers are active across campus; for instance, the Department of Mathematics and Computer Science has its dedicated server at sol.cs.wcu.edu, known by its alias www.cs.wcu.edu.
As we delve deeper into how this intricate network functions, two key areas warrant further exploration: understanding HTML itself and examining how browsers and servers communicate through their protocols. HTML is relatively straightforward—it consists of various text commands called tags that dictate how documents should be structured visually. For those interested in learning more about HTML coding, numerous online tutorials are available; one such resource can be found at http://archive.ncsa.uiuc.edu/General/Internet/WW/HTMLPrimer.html.
Take, for instance, the screenshot below, which displays a basic web page. At first glance, it seems to contain nothing more than the phrase The actual web page. However, like all web pages, it is constructed in HTML format, which is depicted in the subsequent screenshot. In this code, elements such as HEAD are enclosed within specific characters known as tags. This representation illustrates how the web page is transmitted from the server to your browser. The browser then decodes this HTML to present the content as seen in the image.
If you’re using either Netscape Navigator or Internet Explorer to explore a web page, you can view its HTML structure by selecting Source from the View menu on your toolbar. It’s worth noting that you don’t need to be an expert in HTML to design web pages; numerous software tools are available that can assist you in creating a page or converting documents from other formats into HTML.
Now, let’s talk about HTTP (HyperText Transfer Protocol), which serves as the foundation for communication between web servers and browsers. This straightforward application layer protocol establishes a connection between an HTTP client (the browser) and an HTTP server (the web server). As illustrated in our earlier discussion of protocol stacks, this application layer sits atop the TCP/IP framework.
Establishing an HTTP connection typically involves four key steps:
1. Opening the Connection: The client reaches out to the server at a specific Internet address indicated by a URL (Universal Resource Locator). This connection operates at the transport layer and specifically utilises TCP (Transmission Control Protocol).
2. Making a Request: The client sends a message to request services from the server. This request includes an HTTP header detailing what method is being used for this transaction, along with information about itself and any data being sent.
3. Common Method: Among the various methods defined by HTTP, GET retrieves objects from a server, while POST sends data to an object on that same server.
4. Receiving a Response: Finally, once it processes the client’s request, the server replies with its response back to the client.
This structured process ensures smooth communication between users and servers across networks.
One of the most familiar instances of HTTP in action occurs when you use a web browser to click on a hyperlink found on a webpage. This link points to a URL that directs you to an HTML document hosted on a different server. When you click the link, your browser initiates a TCP connection with that server, sends out a request using the GET method for the desired HTML file, and waits for a response. Ideally, this response includes confirmation that your request was successful, along with the HTML content itself. Once this exchange is complete, the TCP connection is terminated.
HTTP operates at the application layer within the protocol stack. One of the benefits of functioning at such an elevated level is that both requests and responses are composed simply as sequences of characters, making them easy to read—much like any text document. If you’re interested, you can even witness HTTP messages in real time through live demonstrations.
At its core, a web server is merely software running on a computer that listens for incoming connections on designated ports. Typically, web servers monitor port 80 by default; however, they can be configured to listen on any port you choose. When your web browser sends out its request message, it’s directed toward the specific computer where the web server operates and through its listening port.
Elliotte Rusty Harold developed a program named clientTester, which he detailed in his book Java Network Programming, Second Edition, published by O’Reilly in 2000. To demonstrate the functionality of clientTester in real-time, the following steps were undertaken: The source code for clientTester was copied to an account on the departmental Linux server and compiled into an executable file. Since clientTester is written in Java, it is compatible with various platforms.
The program was initiated using the command `java clientTester 2000`, allowing it to run and listen on TCP port 80. For this command to execute successfully, the Java Development Kit needed to be installed on the departmental server. Subsequently, a web browser was opened, and in the Location text box at the top of the window, the URL http://www.cs.wcu.edu:2000/simple.html was entered.
This action prompted the web browser to send an HTTP request for simple.html to port 2000 on www.cs.wcu.edu. The clientTester program then displayed the received message from the web browser in its command interpreter window, showcasing a request example for simple.html. A screenshot illustrating this display is provided below.
The specifics of this message will not be elaborated upon, but it is important to note that the term GET at the beginning signifies to the web server that a request is coming from a web client. The reference to simple.html indicates that the request pertains to a file by that name. Similar to how one can conduct a live demonstration of an HTTP request message, it is also feasible to showcase an HTTP reply message in real time. Unlike clientTester, which may not be readily available, the program required for displaying the reply message—telnet—is typically included with Windows XP, UNIX, and Linux operating systems.
To demonstrate how telnet can be used for this purpose, the following steps were taken: The webpage simple.html (the contents of which are detailed above) was uploaded onto the departmental web server. This server listens on port 80 at www.cs.wcu.edu. From any machine equipped with telnet, one would enter the command telnet www.cs.wcu.edu:80 in order to connect to port 80 on the departmental server.
Next, an act was performed as if it were a web browser sending an HTTP request for simple.html. Previously, utilising clientTester provided insight into constructing that request message; therefore, only those necessary lines were entered into the telnet session, followed by a blank line. In fact, this was further simplified down to just one line beginning with GET.
The web server processed this request and returned a reply through telnet. A screenshot below illustrates the entire exchange between this single-line request and its corresponding complete reply message. The portion ranging from HTTP 1.1 200 OK through Content-Type: text-html; charset iso-8859-1 constitutes the header of the reply; all remaining lines represent its body—the requested webpage simple.html.
How HTTP Powers Maxthon Browser
1. Understanding HTTP: Hypertext Transfer Protocol (HTTP) is the foundational protocol for transmitting data over the web. It governs how messages are formatted and transmitted, ensuring that web pages load efficiently.
2. Maxthon’s Structure: The Maxthon browser uses HTTP to request and retrieve web content from servers. When you enter a URL, Maxthon sends an HTTP request to the server hosting that page.
3. Handling Requests: Each time you navigate to a new site or refresh an existing one, Maxthon constructs a request packed with information such as your browser type and what you’re trying to access.
4. Receiving Data: Upon receiving your request, the server responds with an HTTP response, which includes the requested data along with status codes indicating whether the request was successful or if there were issues (such as 404 errors).
5. Rendering Pages: Maxthon interprets this incoming data and transforms it into visual elements—text, images, videos—creating a seamless user experience.
6. Optimizing Speed: Additionally, Maxthon leverages optimisations within its engine to enhance browsing speeds through features like caching and pre-loading resources based on your browsing habits.
7. Secure Connections: Maxthon supports HTTPS (HTTP Secure) for secure browsing. This ensures that data exchanges between your browser and websites are encrypted for privacy and security.
8. Extensions and Tools Integration: Maxthon also utilises various extensions that communicate via HTTP for additional features like ad-blocking or enhanced privacy controls, enriching overall functionality.
9. Continuous Updates: Regular updates in performance engineering ensure that Maxthon remains aligned with advancements in HTTP protocols, optimising speed and security as they evolve.
By leveraging HTTP seamlessly, Maxthon delivers an efficient and secure browsing experience tailored to user needs.