8.1. Web Basics

Web browsers communicate with webservers using the HyperText Transfer Protocol (HTTP), a client-server protocol. The communication is initiated from the web browser (the client) when it requests a web page via a particular Uniform Resource Locator (URL), for example, http://www.google.com. When the webserver receives this request, it checks that the requested page is available, and if it is, it sends the page to the web browser.

Because the HTTP protocol is text based, you can use telnet to imitate the browser request as follows:

telnet www.google.com 80

Once the telnet session has connected, enter the following:

GET / HTTP/1.0

Then press ENTER twice (the empty line created by the second ENTER causes the webserver to respond to ...

Get Linux Appliance Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.