Web Browsers and Servers

Web Browsers and Servers

Web browsers were originally developed to display static text and graphics stored on servers. The web browser to web server relationship is similar to many other types of client-server systems, although no other system has ever seen such universal standardization. The most common text formatting standard used on the web is HTML, the HyperText Markup Language. The basic structure of a HTML document is text with formatting commands denoted between the <> brackets. For instance, a simple HTML page would be:

 <html> <head> <title> A Sample Page </title> </head> <body> This is my first web page. </body> </html> 

The web page above contains two main parts , a header section and a body section. In the header section is a title. The title is displayed in the top window header by most web browsers. The body contains the actual text of the page. The above file would then be stored in the document directory of a web server.

Basic communication between a web browser and a web server is done using HTTP, the HyperText Transfer Protocol. A web user specifies the web page to load by entering a URL, or Universal Resource Locator into the Location field of web browser. For instance, to access the Sun Microsystems home page, you would enter the URL:


During the first few years of widespread web usage, many companies adopted the www.company- name .com convention. Recently, many companies have re-programmed their DNS service to allow their home page to be referenced without the "www" preface, as shown in the URL for Sun's home page above.

A complete URL follows the following syntax:

 protocol://server name:port number/directory/subdirectory/ filename 

This is much more complicated than the typical URL of the form "sun.com" or "www.sun.com" common to most people. This is because much of the URL information defaults to set values if not specified. Some default values include:

  • protocol: http:

  • port number: 80

  • directory/subdirectory/filename: default provided by server when not specified, typically defaulting to the file "index.html" in the top level web server document directory

Let's examine exactly what happens when you type in a URL such as "sun.com" into your web browser. First of all, your browser defaults the protocol type to "http" if no protocol was specified. The browser then attempts to make an HTTP connection to the host sun.com. This will involve looking up the actual IP address of the sun.com hostname. The IP address lookup will typically involve a Domain Name Server (DNS) transaction, or at least a name lookup to some system that ultimately is fed by a DNS server. The requested file, in this case blank, is passed to the web server as part of the HTTP request.

The web server accepts the HTTP connection and returns the text of the specified file. If no file is requested, the default "home page" file of the web server is returned. The web browser then receives the HTML file and formats it for display.

The original developers of the HTTP and HTML protocols had cross-platform portability in mind as a key requirement. Because of this, they did not attempt to specify any image format into HTML. Instead, they included in HTML the ability to include arbitrary image types using the "img" tag. An example of a how this is done is shown below.

 <html> <head> <title> Sample Page With Graphics </title> <body> This page includes a sample graphic image below. <img src="my-picture.jpg"> </body> </html> 

The special <img> tag tells the web browser that besides the text, a separate image file needs to be retrieved and displayed on the page. The image file type is identified by the.jpg extension. Most web browsers, regardless of platform, understand how to display at least gif and jpeg image files.

Software Development. Building Reliable Systems
Software Development: Building Reliable Systems
ISBN: 0130812463
EAN: 2147483647
Year: 1998
Pages: 193
Authors: Marc Hamilton

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