How does the World Wide Web (WWW) work?

how web works

Client-Server Model

The web works on a client-server model. The client  which is your Computer, more specifically the browser you are using, sends a request to the Server to fetch the page you have entered in the address bar of the browser. The Server checks if the page exists, if it exists the server will send the HTML page in response and if it the requested page doesn’t exists then the server sends a 404 Error code which means the web page doesn’t exist on the server.  So if you will put www.cleantutorials.com/about in your browser. The Server where this site is hosted will return the “about” page. But if you put www.cleantutorials.com/xyz in your address bar you will get a 404 Error as the page doesn’t exist on our server.

So the client sends the request and the Server returns the web page as response and hence it is also called the Request-Response model.

Web Pages

Web pages are HTML (.html extension) documents that are stored on the Server. Its not necessarily HTML documents only. There exists some Server side languages such as PHP, Java  which store their web pages as files with .php or .jsp extension. example www.abc.com/xyz.jsp. Even though the extension is jsp  the final response from the server will always be an HTML web page. You don’t have to worry about server side languages right now.

Server

Server is a simple computer which hosts your website’s content and has an internet connection. Small to medium sized websites usually use machines similar to your desktop computer or your  laptop. Server is not a special computer you can even make your desktop a web server, all you need to do is, have a static IP and 24/7 internet  connection and the most important thing Apache web server, a free software which can be downloaded from here. The exact procedure will be shown to you in later posts.

It’s not a good idea to host your website on your own desktop because.

  1. You have to keep your computer online all the time (24 hours a day), you will have to make sure to get power backups and a backup machine in case the main machine fails.
  2. Most people don’t have a static IP Address, IP Addresses are assigned to us by our Internet Service Providers (ISP’s) and they keep on changing. The website address is mapped to the IP address of  your server machine. So your previous IP address can be assigned to someone else and now that website will point to  some other person’s computer.
  3. Hosting your website on hosting websites such as BlueHost, HostGator, Siteground and many other is very easy and requires very little technical knowledge. Plus they provide you with free support on any issue you have.
  4. Most hosting websites guarantee 99.9% uptime.  Which means your site will be available to public 99.9 % of the time.
  5. Web Hosting is very cheap.

Browser

The first thing that you need to view a web page is a Browser (Client). A browser is a software that is capable of connecting to a Web Server , sending an HTTP request (a request for a particular page) and receive HTTP Response (an HTML page as response) and display the HTML page on your screen. Google Chrome and Firefox are the very best browsers available right now.

CommentsLoad Comments