วันอังคารที่ 26 สิงหาคม พ.ศ. 2551

How The Web Works

Writen by Pallab Kakoty

How the Web Works

Because you're taking this course and reading this lesson, it's a pretty safe assumption that you can get on the Web and move around with certain adeptness. To access any given web pages, we are most likely to use its web address which is technically called a URL (Uniform Resource Locator) and click on hyperlinks and graphics to move from one page to another. In general, the Web is a pretty seamless world; you often move from one Web site to another and may not know you have done so. If you want to add your Web page -- and eventually your Web site -- to this virtually seamless environment, you'll need to understand a bit about the workings behind the Web scenes.

Of Clients and Servers Simply put, the Web is a gigantic network. What that means in geek-speak is that there are, in the most general terms, two roles that a computer can play on the Web: client or server. Anything else deliverable over the Web including documents, images, sound files is stored by the server and clients access those files. Occasionally, a computer can play both roles, but more often than not, a computer is one or the other.

For example, when you type the URL http://www.yahoo.com/home.html into your Web browser, your client is sending a request to the Yahoo Web server -- ( identified as http://www.yahoo.com) for a Web page called home.html. When the Web server receives your request for home.html, it looks to see if the Web page exists, and if it does, the server sends a copy to you so that you can view it in your browser. An error message is received to let you know that the page you wanted could not be found whenever the page does not exist on the server. Web Clients and could Web Servers communicate with one another through a system of requests and responses.

The Web would not work without clients and servers. The clients could access each of the web documents stored on the servers all over the world regardless of where the client or server is actually located. This means you can request pages from servers in Sydney, Australia, and Van Horn, Texas in the exact same way and receive responses from each server in the exact same way. In the end, Web surfing is nothing more than a Web client -- a.k.a. A series of web pages are being requested from the Web servers located all around by the Web Browser.

How Protocols Help Computers Communicate

All kinds of operating systems –- PCs, Macs and Unix to name just three -- is running all across the world and both clients and servers can be any kind of computer running any kind of operating system. You could be using a computer which is running on windows to serve you with a website and likewise one may surf the web with a Macintosh client. A Unix computer running Linux may serve the next Web page you view. The beauty of it all is that you, the user, don't know the difference. A Web page is a Web page, no matter what kind of computer it lives on.

A different kind of computers does not usually play well together and you know that most of the time it takes a bit of jumping through hoops to make them communicate. So why is it that the Web -- which is made up of all kinds of computers -- works so seamlessly? It's simple, really. All of the clients and servers on the Web speak a common language called the HTTP protocol.

Common Ground

A protocol is a set of rules two computers use to communicate with one another. A protocol called HTTP (Hypertext Transfer Protocol) is spoken by both the Web browser and Web servers that carefully defines how Web pages are requested and received. It doesn't really matter which operating system is running for as long as both the browser and the server speak HTTP. The HTTP protocol is the common ground that allows them to communicate.

Different computers just could not work with each other and so without protocols, the web would not work at all. Although HTTP is the protocol for requesting and sending Web, there are other protocols as well at work on the Internet besides HTTP.

Putting It All Together

The HTTP protocol is written in HTML (Hypertext Markup Language) to request and send the actual web pages that clients and servers uses.

A Large amount of data can be stored on the server and the same serves if to hundreds of clients, often at the same time. A collection of web servers is actually what is used to respond to client request by web sites like Yahoo and Microsoft as they receive hundreds of thousands of hits everyday. It is not mandatory for the Web server to run the same kind of operating system which the Web clients is using whenever the Web pages are being requested. Protocols fill the communications gap between different kinds of computers and allow them to exchange Web pages simultaneously.

What This Means To You

You may be wondering why you should care about what goes on behind the scenes of the Web. In fact the web is designed in such a way that you don't need to care as a web surfer. To find a place to serve your web pages needs to be found by you as a web developer -- a Web server of some kind -- so that your users can request your pages using their Web browsers. Your Web pages can't be seen by the world unless they reside on a Web server that is hooked up to the Internet. Anyone with a Web client could access your web pages, once your pages are made available to a connected server(remember, that's a fancy name for a browser). For now, that's all you need to know about Web clients and servers. In a later lesson you'll learn more about finding a Web server home for your documents.

ไม่มีความคิดเห็น: