Web Basics

History of Web

  • Created by: Tim Berners-Lee in 1989
  • In his words: “a need for a collaborative knowledge-sharing tool”
  • It has grown under the guidance of the World Wide Web Consortium (W3C)
  • Graphical browsers were introduced in early 90’s

What is web ?

  • Mesh of computers communicating and working together
  • Web works on the standards of communication
  • Two most important standards or protocols are HTTP(Hyper Text Transport Protocol) and HTML(Hyper Text Markup Language)
  • Client/Server Relation

Client-server Model

The client-server model is a design pattern or architecture that constrains system/solution activities between two parties; a client and a server. The concept of client-server is based on a request-response relationship but isn’t always representative of a physical machine, location or person.

Where a client makes a request for a resource from a server, the server responds to the client with the requested resource or a reason that its unavailable.

We tend to consider browsers, phones and laptops as straight-up clients. They send requests out to the internet somewhere then process the response. For the most this is generally true but there are scenarios, especially on the back-endopen in new window where a server in one relationship can be a client in another.

Client-server Model

HTTP

Knowing now that there are relationships between parties in a client-server model, we need a standard way to communicate.

Hypertext Transport Protocolopen in new window (HTTP) provides a standardized framework to enable the ‘fetching’ of documents and other resources and is the basis for exchanging data on the internet.

HTTP messagesopen in new window in the form of either an HTTP request or response are sent back and forth between the client and server. HTTP messages are usually comprised of two parts, a header and body or, payload. The header contains message metadata and the body carries the cargo.

Thousands of HTTP messages can be sent and received before a requested resource is transmitted.

Deep Dive

For more information on HTTP messaging, you can view the HTTP Messagingopen in new window module of the HTTP Fundatmentals course on PluralSight

Browsers and User Agents

According to MDN:

A user-agent is any tool that acts on the behalf of the user. This role is primarily performed by the Web browser; other possibilities are programs used by engineers and Web developers to debug their applications.

The browser is always the entity initiating the request. It is never the server (though some mechanisms have been added over the years to simulate server-initiated messages).

User-agents on MDNopen in new window