Browsing Around the Internet Shopping Mall: The World Wide Web


Back in Chapter 2, "A Network's Reason for Existence," you had a brief look at how the World Wide Web works. In many ways, the web works a lot like the retail model for businesses. In fact, when a retailer decides to offer goods for sale on the web, the retailer can use many of the same business processes that it uses with its bricks and mortar stores to support its Internet sales operations.

In case you do not remember the details from Chapter 2, here are some quick reminders. The end user PC uses software called a web browser, or simply a browser. When talking about e-mail and FTP, you refer to the software on the end user's PC as an e-mail client or an FTP client, respectively. Along the same line of reasoning, with the web, you could use the term web client to refer to the web browser software on an end user PC, but most people use the term "web browser" instead.

The other end of the story depends on someone to create a website, which is located on a web server. With FTP, someone had to put files on the FTP server before it had useful files for other FTP users to retrieve. Similarly, with web servers, someone must create some content and put it on the web server before the end user can do anything useful.

The information that sits on a web server, which end users can view with a web browser, is generically called web content, or simply content. Content consists of individual web pages, the collection of which is called a website. Figure 8-13 shows many of the concepts and the process.

Figure 8-13. Building and Stocking the New Retail Store, AKA New Website


The following list describes what happens with each of the four messages that Conner sends in the figure:

  1. Web server software must be installed on the computer that will be used as the web server.

  2. Someone creates the content that should be displayed by the http://www.fredsco.com website and puts that content onto the web server. The content consists of a number of files; the files can be copies from the web developer's computer to the web server using any means, including FTP.

  3. Now the web server is ready to respond to potential customers. One such customer, Conner, opens his web browser and tries to connect to http://www.fredsco.com.

  4. The web server gets Conner's request and sends the web page back to Conner.

The basic model has many people creating websites and many people with browsers on their computer viewing these websites. The next sections cover a few details about the protocols and standards used that web browsers and servers use.

Rules, Schmools for Web Retailing

To start, let's consider how to load a default web page, often called a home page. From the users' perspective, they must identify the website. They can do that in many ways. For now, let's assume that Conner, in Figure 8-14, types http://www.fredsco.com near the top of the browser. Next, the Fredsco home page appears.

Figure 8-14. Connecting to the Fredsco Home Page


Notice the string of characters that starts with HTTP (http://www.fredsco.com). The whole string is called a uniform resource locator (URL). The URL identifies the protocol in use, as well as the name of the server. For instance, HTTP stands for Hypertext Transfer Protocol and is the TCP/IP protocol you use to send the web page content from the web server to the web browser. Next, the stuff after the // lists the name of the server. In Chapter 13, I'll tell you more about names in TCP/IP, but for now, just assume that the name www.fredsco.com identifies the computer where fredsco's web server is running.

The first message that the browser sends includes the HTTP command GET (default). That means that the browser has asked the web server to send the browser that server's default web page, also called that server's home page. When the web developer created the web pages and moved them to the server, one web page was defined as the default. So, the server then looks in its configuration and finds the name of the file that holds its home page. Using HTTP, the server sends the contents of a file called home.html back to the browser.

The file that the web server sent by Conner's web browser is an .HTML file type, meaning that the file contains text that conforms to a specification called Hypertext Markup Language (HTML). HTML was the first language used to describe the contents of a web page. When Conner's browser gets the home.html file, the browser understands HTML, so it can then display the right contents in the browser window. Interestingly, when some people got together to create HTTP originally, most of the web content was HTML, and they were creating a protocol with which to transfer the HTML files. That's why the first word in the H 17TTP acronym is hypertext.

Interestingly, although TCP/IP standardizes HTTP in RFC 2616, TCP/IP does not define anything about HTML. HTML does tell the browser what to put in the browser window, what color to make it, what size, and so on, but it does not define anything about how to send and receive data; therefore, TCP/IP doesn't care much about HTML!

In summary, the browser uses HTTP to ask for particular web pages, and the server uses HTTP to actually transfer the files. Web pages are simply stored in files on the server's disk drive. By transferring the files to the browser's computer, the browser can read the content inside the files and display the contents for the end user.

Buy One, Get a Bunch for Free

Have you ever tried to load a web page and noticed that some parts show up right away while the rest of the page fills in slowly? In this section, you'll learn what causes that.

In reality, when you load a web page from your browser, you actually get a lot of files, not just one. When the browser gets the first file, as in Figure 8-14, it really has just begun to load what the average user thinks of as the web page. Often, the first object downloaded by HTTP is an HTML file. (The term "object" refers to individual files that HTTP transfers; each web page consists of one or more objects.)

HTML files include text that goes on the web page, formatting instructions, plus instructions for the browser to download other objects that should also be displayed. For instance, when Conner loaded Fredsco's home page, he got a file called home.html. This file included a lot of the text that goes on the home page and some instructions about where to put various graphical images. However, the HTML file did not include the graphics images; they are in separate files on the web server and are considered to be different objects. So, the real process happens something like this:

1.

Conner's browser gets the HTML file using HTTP.

2.

Conner's browser reads the file, displaying things on the screen as a result.

3.

When Conner's browser reads the file, it might have instructions that require Conner to download other objects. If so, it uses HTTP to get those objects.

4.

Conner's browser reads the contents of the new objects, displaying things on the screen as a result.

5.

When Conner's browser reads the newly downloaded objects, the objects might have instructions that require Conner to download other objects. And so on….

Eventually, the process ends, all objects are downloaded, and the browser displays something that looks like the web developer intended. Figure 8-15 outlines a simple example.

Figure 8-15. Transferring All the Files That Make Up a Web Page


Conner's browser gets the original home page, reads it, and processes it. The home page HTML file told Conner to get two other objects: a file called logo1.gif and another called ad1.gif. (.GIF files contain graphics images.) The original home.html page included URLs that told the browser that the files were both located in directory /graphics on the server, so the HTTP requests included the directory name when asking for the files. The home.html file also told the browser where to display the two graphics images in the browser window, so after getting the files, the browser put them on the screen.




Computer Networking first-step
Computer Networking First-Step
ISBN: 1587201011
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Wendell Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net