Home Xml Feed Submit Articles Terms of Use Privacy Resources Add URL Partners AddThis Social Bookmark Button
WebDesignArticles.Net
RSS Feeds Add us to favorites
Make us your home page
Free Newsletter
Subscribe to newsletter
Categories
Animation & Rich Media
ASP.Net
Data Entry
Databases
Dedicated Hosting
Document Storage
Domain Names
Graphics
Hosting
Internet Marketing
Logo Design
PHP
Printing
Reseller Hosting
Search Engine Optimization
Social Networking
Software
SSL Certificates
Style Sheets & Tables
Templates
Unix Hosting
W3 Standards
Web Design
Web Hosting
Web Publishing
Webpage Creation Software
Website Promotion
Windows Hosting


From The Server To The Web Browser: What Goes On?
Author: J.M. Stevens
Website: http://www.webdesignarticles.net/
Added: Mon, 03 Apr 2006 13:31:09 -0500
Category: Databases
Printable version | Email | Bookmark

Every time you click on a link in a web page or type a URL into your web browser you are in fact making a 'request' for a certain document. That request is carried out with the Hyper Text Transfer Protocol (HTTP) and sent over the Internet all the way to the server which is keeping the document in question. If everything goes well the server responds by sending the document, which is usually a web page of text and graphics.

The HTTP is part of the Internet Protocol (IP) suite. It is used by the 'client' which here is the web browser in order to create a connection with the server which hosts a website in particular. The server waits for incoming requests by monitoring TCP port 80.

Transmission Control Protocol (TCP) is used to produce connections between two computers on the Internet so that they can exchange data. TCP has provisions for identifying the requesting computer and also for transmitting information with time stamps so that it can be gathered again in the correct order once it arrives to its destination.

There are many standardized uses for TCP ports. For example, TCP port 21 is usually reserved for FTP (File Transfer Protocol) in order to upload and download files. Port 80 is usually employed for HTTP.

If your server gets a request string on TCP port 80 in the shape of GET / HTTP/1.1 it will send a response code which will depend on whether the requested web page is available or not. A classic request goes like this:

GET /faq.html HTTP/1.1
Host: http://www.mywebsite.com

This will be a request for http://www.mywebsite.com/faq.html. The 'Host' needs to be specified in order to distinguish websites which are hosted on shared servers. If faq.html is available the server will then reply:

HTTP/1.1 200 OK
Date: Mon, 12 October 2005 22:38:34 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT

...followed by the actual web page.

HTTP/1.1 200 OK signifies that the web page you requested is available. Other codes can also be returned. For example, the code 404, signifies that the server cannot find the page you requested. The web page is sent through TCP as a set of data packets with a header each that will specify its destination and order in the data stream. The various packets can all take on various routes in order to reach their target. Each packet is sent through a router which polls other routers which are near by. However, if a connection with the first router is unavailable, the data will be sent through another one.

As the data is received, the client (web browser) will send back an acknowledgement. This will ensure that all the packets are received within the right amount of time. If they aren’t, they will be re-transmitted by the server. TCP will also check that the data is not damaged. The data will be rearranged in the right order thanks to the sequence number of each data packet. And there you go! Then the web page appears on your computer screen.

Also, the TCP connection can be kept alive for further requests from the client. This will enable several pages to be requested within a short span of time without causing the overhead to open and close TCP ports. The client or the server can end the connection any time by just closing it.

Article Source: http://www.webdesignarticles.net.

View all J.M. Stevens's articles


About the Author:
J.M. Stevens is contributing editor at http://www.webdesignarticles.net/. This article may be reproduced provided that its complete content, links and author byline are kept intact and unchanged. No additional links permitted. Hyperlinks and/or URLs must remain both human clickable and search engine spiderable.

More Databases articles


:- Articles Search

Search our article database!

For more information and special deals related to any of the issues on this page, please place your cursor over the double-underlined links. All link information supplied by Kontera.com

:- Recent Articles
Most Common SEO Mistakes
Shared Web Hosting Service: Factors That Matter

:- Top Resources

Build A Website - Free guide and resources show you how to build an attractive website.


 

Copyright © 2006-2008 WebDesignArticles.Net  All Rights Reserved.