Web 101: How does the Web Work?

What’s the Internet?
For more basics on the Internet, see How Stuff Works.

Sometimes when I present my E-Biz seminars, an attendee is lost about the foundation of the Internet — what is it, exactly? Here it is, for those who like to start at the very beginning (a very good place to start)…

The Internet is a city (ooh, a metaphor!): There are roads, big and small; traffic lights that regulate traffic; homes and businesses that you can visit; and sometimes, traffic jams. Sure, the Internet is really a massive network of computers, all connected by wires and routers that pass information back and forth. But the metaphor helps: a Web server is akin to a home or business within the city. The wires of the network are like roads (some allow traffic faster than others). Every destination on the Web must have a unique address — that’s how the information gets from one place to another. There are even private roads and gated communities that you must have permission to use. Now, let’s mash up the metaphor…

A Web Server is usually a souped-up computer that runs Web server software designed to listen for, and respond to, requests for information. Think of it like a business in Internet City: It is always on and connected to the Internet, and it just hangs out and waits for a request to come its way. (Actually, Web hosts can handle many smaller Web sites per server machine, so in theory your Web site might reside on the same box as your competition.)

A Web Client is your computer, which connects to the internet in one of several ways. From the Web browser, you send requests for Web pages. These requests head out your driveway, make a right on Main, hop on the freeway, and finally arrive at the destination business (the Web server identified by the domain name you typed into the Browser’s Web Address box, or the Web Address of a hyperlink that you clicked on from another Web page). On arrival, your request identifies itself to the Web server and says, “Gimme the Home Page,” or whatever page you requested. Then it heads back to you. When you’re connected to the Internet, your computer has a unique identifier (your IP Number), so that the request can correctly find its way back to you. When it arrives back, information in tow, it presents this information to the Web Browser.

A Web Browser is really an interpreter of HTML, which is a way of marking up plain text so that it has formatting, style and shape. (See this bold text? It’s been marked up; otherwise, it would be plain.) Most people use Internet Explorer (IE) as their browser, but many Mac users use Safari, and more and more people (including me) are using FireFox. It doesn’t really matter, except that each interprets HTML a bit differently, and some Web page designers don’t bother to check that their pages work in anything but IE. So the browser takes the HTML and sets about arranging it on the page so you can view it. Images and other visual content are delivered separately from the HTML, so when the browser runs across an image placeholder withing the HTML page, it sends a new request to the Web Server: “Gimme image ‘logo.gif’.” Once that image arrives, it is placed into the page (that’s why, on slow dialup connections, the text loads first). If a Web page has HTML plus a dozen images, your browser will have sent thirteen requests to the Web server by the time the page is completely loaded. Same with movies and Flash animation, except they take longer because the file is bigger.

When you click another link, the process repeats: your request heads out the door, down the street, says “gimme” to the Web server, returns to you and hands the HTML to your browser so it can display a new page. All this happens in seconds…

…unless there’s traffic on the Interstate. Or the Web server’s getting a lot of customers at the moment your request arrives and yours has to wait… or the HTML markup has problems that slow the browser down… or the images are huge, so it takes longer for them to completely load.

Thus, the speed at which a Web page displays is dependent on several factors — but usually, it’s the total size of the HTML file plus all the images and other visual elements.

Summary: For your web site to work, several key things must be in place.

  1. You must have a domain name (also known as a URL or web address).
  2. Your domain name must point to a specific Web host running Web server software that hosts your Web site (the Web uses DNS records to keep track of which domains point to which hosts — kind of like the yellow pages).
  3. The Web server must be on and accepting requests for HTML. (Sounds simple, but if the server crashes, so does your Web site.)
  4. You must have placed at least one page of HTML on that Web host. If your page includes images or other visual files, these must also be placed on the Web server that hosts your site. If your page links to other HTML files, they must also be placed on the Web server. You probably created these on your personal computer, but for the site to work, they must be moved (“uploaded” or “published”) to the Web server. Or, you might have filled out a Web form and saved the files in that way, but in any case, all necessary files must be on the Web server.