Most of us surf the Internet several times a week, if not several times a day. We visit website after website, viewing information, playing games, and occasionally downloading software. The World Wide Web is an incredible spectacle, but none of it would exist without web servers.
Web servers are the backbone of the web, since they are responsible for serving up every web page you see. Most people take the Internet for granted. It takes a lot of work to do something as simple as display a web page. When you clicked on the link to view this article, a series of smaller operations commenced which, while each is small on their own, all fit together to bring you this brilliantly written composition. But how did it work? What actually had to happen to make this text appear in your web browser?
Why don’t we break down what happens when you use a web browser. First, you select a URL to go to, either by typing it into the browser, or clicking a link in an email or webpage. For example, lets assume you go to http://www.jamsoft.biz/about.asp to find more information about the author of this article. You type that into your browser and “abracadabra”, the page appears on your screen.
What actually occurs to bring that page to your screen is a little complicated. I will explain it in two steps, first giving you a brief explanation before giving a more detailed explanation in addition.
For starters, when you typed in the website above, your web browser broke the URL into three different pieces.
The first part is the protocol that the web server should communicate with. In this example, the protocol is “http”. This tells the web browser that you wish to communicate with a web server on port 80, which is the port reserved for web page communications.
The second part of the URL is the server address. In our example, the server address is www.jamsoft.biz . This tells the web browser which server it needs to contact in order to retrieve the information you are looking for. The web browser communicates with a domain name server (DNS) to find out the IP Address for the website. All communications on the Internet use IP Addresses for communications. The website names that we know and love were invented just to make it easier for us to find the websites we need. Imagine if the only way to surf the Internet required that we remember IP Addresses for each site that we visit frequently.
The third part of the URL is the resource you want to see. In our case, we are looking for the page “about.asp”.
The web browser, having found the IP Address it needs by communicating with the name server, then sends a request directly to the web server, using port 80, asking for the file “about.asp”. The web server sends the html for this page back to your web browser, which reads the HTML tags and formats them for viewing on your screen. If there are additional files needed in order to show the web page (like some images, for example) the web browser makes additional requests for each of these. It is not uncommon for a single web page request to trigger 5 or more separate file requests from a web server.
That is a quick explanation of how a web browser communicates with a web server to display the pages you view on the web. While this explanation is complete by itself, a little extra understanding never hurt anyone. To this point, I would like to discuss protocols and IP Addresses in more detail.
As I mentioned, the first part of a URL is usually the protocol that you would like to communicate. The protocol is the special set of rules that end points in a telecommunication connection use when they communicate. The protocol in this case tells us two things. First, part of the protocol definition is which port communications are going to take place on. All Internet communications take place on different ports, and each port typically handles one kind of protocol. For example, HTTP (hypertext protocol) uses port 80 to communicate, whereas FTP (file transfer protocol) communicates on port 21. The second thing the protocol determines is the actual format of the communications. Each protocol has a different purpose, and the communication format is different for each of these specific protocols. The protocol part of a URL tells your web browser what port to communicate on and how the communication is to be formatted.
When describing the process above, I mentioned that all communications on the Internet use IP Addresses to work but I didn’t describe what exactly an IP Address is.
An IP address is a 32-bit numeric address written as four numbers separated by periods. Each of the four numbers can be from 0 to 255, an example would be 192.168.0.5 . The IP address identifies a sender or receiver of information across the Internet. When you request an HTML page or send e-mail the Internet Protocol part of TCP/IP includes your IP address in the message (actually, in each of the packets if more than one is required) and sends it to the IP address of the server to which you wish to communicate. The recipient can see the IP address of the Web page requestor or the e-mail sender and can respond by sending another message using the IP address it received. Each machine on the Internet is assigned a unique IP Address for the purposes of communication.
By using the protocol and the IP Address specified by the first two parts of the URL, your web browser is able to request the information specified in the third part from the correct web server. This is the foundation that the World Wide Web is built on.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More Web Hosting Articles Articles
More By Rich Smith