Introduction to Web

This article explain what web is, what web servers are, how web servers work, and why they are important.

Before starting the discussion about web, let discuss in brief about Internet. The Internet is the backbone of the Web. It is the technical infrastructure which makes the Web possible. At its most basic, the Internet is a large network of computers which communicate all together. As you might notice, when we browse the Web with a Web browser, we usually use the domain name to reach a website. Does that mean the Internet and the Web are the same thing? It's not that simple. The Internet is a technical infrastructure which allows billions of computers to be connected all together. Among those computers, some computers (called Web servers) can send messages intelligible to web browsers. The Internet is an infrastructure, whereas the Web is a service built on top of the infrastructure. It is worth noting there are several other services built on top of the Internet, such as email, Internet Relay Chat(IRC).

How the web works

this section provides a simplified view of what happens when webpage is visited in a web browser on your computer or phone. For the discussion of web, we should know about clients and servers. Computers connected to the internet are called clients and servers. Clients are the typical web user's internet-connected devices(e.g laptop, mobile phone).Servers are computers that store webpages, sites, or apps. When a client device wants to access a webpage, a copy of the webpage is downloaded from the server onto the client machine to be displayed in the user's web browser. Besides client and server there are many other parts involved i.e internet connection, TCP/IP,DNS(Domain Name Server--which map the website name to it's ip address),HTTP,component files.

When a web address is typed into web browser:

  • The browser goes to the DNS server, and finds the real address of the server(IP address) that the website hosted on.
  • The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client . This message, and all other data sent between the client and the server, is sent across internet connection using TCP/IP.
  • If the server approves the client's request, the server sends the client a acknowledgment, and then starts sending the website's files to the browser as a series of small data packets.
  • The browser assembles the small packets into a complete web page and displays it in screen.

Difference between webpage, website, web server

Lets describe various web-related concepts: web pages, websites, web servers, and search engines. These terms are often confusing or are incorrectly used. Let's learn what they each mean!

Web Page: A web page is a simple document displayable by a browser. Such documents are written in the HTML, CSS, JavaScript.

Web Site: A website is a collection of linked web pages (plus their associated resources) that share a unique domain name. Each web page of a given website provides explicit links—most of the time in the form of clickable portions of text—that allow the user to move from one page of the website to another.To access a website, type its domain name in web browser address bar, and the browser will display the website's main web page.

Web Server: A web server is a computer hosting one or more websites. "Hosting" means that all the web pages and their supporting files are available on that computer. The web server will send any web page from the website it is hosting to any user's browser, per user request. The term web server can refer to hardware or software, or both of them working together.

  1. On the hardware side, a web server is a computer that stores web server software and a website's component files (for example, HTML documents, images, CSS stylesheets, and JavaScript files). A web server connects to the Internet and supports physical data interchange with other devices connected to the web.

  2. On the software side, a web server includes several parts that control how web users access hosted files. At a minimum, this is an HTTP server. An HTTP server is software that understands URLs (web addresses) and HTTP (the protocol web browser uses to view webpages). An HTTP server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user's device. At the most basic level, whenever a browser needs a file that is hosted on a web server, the browser requests the file via HTTP. When the request reaches the correct (hardware) web server, the (software) HTTP server accepts the request, finds the requested document, and sends it back to the browser, also through HTTP. (If the server doesn't find the requested document, it returns a error response instead.)

To publish a website, there is a requirement of either a static or a dynamic web server.

Dynamic vs. static web servers: A web server can be used to serve either static or dynamic content. Static refers to the content being shown as is, while dynamic content can be updated and changed. A static web server will consist of a computer and HTTP software. It is considered static because the sever will send hosted files as is to a browser.

Dynamic web browsers will consist of a web server and other software such as an application server and database. It is considered dynamic because the application server can be used to update any hosted files before they are sent to a browser. The web server can generate content when it is requested from the database. Though this process is more flexible, it is also more complicated. For example, to produce the final webpages in the browser, the application server might fill an HTML template with content from a database. Sites like Wikipedia have thousands of webpages. Typically, these kinds of sites are composed of only a few HTML templates and a giant database, rather than thousands of static HTML documents. This setup makes it easier to maintain and deliver the content.

Common and top web server software on the market: There are a number of common web servers available, some including: Apache HTTP Server, Microsoft Internet Information Services (IIS),Nginx, Lighttpd.