- Featured Columnists
Table of Contents
- Web Basics
- Publishing on the Web: Putting Files on the Server
- Web Design Process and Workflow
- Project Management
- Mark My WWWord: HTML and XHTML
- Standards Compliance
- Meta Tags and Search
- Enhancing Web Page Interaction
- Web Graphics
- Web Page Optimization
- Overview of Servers
- Server Programming Basics
- Careers in Web Design
- Intellectual Property for Web Designers
Last updated Oct 17, 2003.
Whenever we go someplace on the Web, we use HTTP as part of the URL address. It does much more than whisk us to our destination sites as explained in the previous sections. HTTP (Hypertext Transfer Protocol) is the language of clients and servers. They speak HTTP to each other.
HTTP transactions consist of a client request followed by a server response and the request has three parts:
Request or response line
Request or Response Line
When you click a link on this page, the client contacts the server at a designated port number, often the default of 80. During this communication, it is requesting a document through an HTTP command called a method followed by a document address, and then the HTTP version number: GET /index.html HTTP/1.1
GET is the method meaning to retrieve the document index.html using version HTTP 1.1. Other methods are POST, PUT, TRACE, and LINK.
Header Section and Entity Body
The next thing the client sends is an optional header to tell the server of its configuration and the document formats it accepts. Headers are sent line by line with each line containing a header name and value in Header-Name: Value format. For example:
User-Agent: Mozilla/4.04 Accept: text/html; */* Cookie: name = value Referer: http://www.meryl.net/
User-Agent indicates the browser the client is using. Accept tells the server what files the client can accept. */* indicates that documents of all types are accepted. Cookie would typically have a name and value in its place. This is how the server remembers who you are and serves personalized pages. Referer (yes, it's misspelled) is the last Web page you visited prior to landing to the current Web page.