All about HTTP jargon

·

4 min read

HTTP stands for hypertext transfer protocol and is used to transfer data across the Web. I know I know, I didn't get it either the first time around. 😔 Apparently, knowledge of HTTP is considered a "critical protocol" for web developers because of its widespread use it is also used in transferring data and commands in IoT applications. P.S. Protocol is just a fancy tech word for a set of rules.

So, let's take it from the very top!

Necessary Background

The Internet works in mysterious ways under the ocean. Yup, the so-called internet that we are all connected with is just a bunch of wires laid in the ocean. To give this a formal definition:

The Internet is a worldwide computer network that transmits a variety of data and media across interconnected devices.

When data is transferred over the internet, it’s delivered in messages and packets. Data sent over the internet is called a message, but before messages get sent, they’re broken up into tinier parts called packets. These messages and packets travel from one source to the next using Internet Protocol (IP) and Transport Control Protocol (TCP). TCP/IP is a set of rules that govern how information is sent from one computer to another computer over an internet connection.

Also, everything on the Internet works in a client-server model. The client is someone who wants to get access to something like maybe google.com so it requests something, while the server is the one that provides access to it so it sends back a response. But there are layers to how this transfer carries out.

The set of all layers is called an OSI Model which has 7 layers :

  1. Application Layer

  2. Presentation Layer

  3. Session Layer

  4. Transport Layer

  5. Network Layer

  6. Data Link Layer

  7. Physical Layer

The Application Layer refers to the software the user interacts with like web applications or browsers. But how does a website gets delivered from a server to a web browser? That's where HTTP comes into play.

The Communicator HTTP

You must be aware that websites are hosted on a cloud-based server and behind every simplistic domain there is a machine-readable IP address. For example, the domain google.com has an IP address of 142.250.195.14. Also, every component like video, image, document etc has its own URL and hence an IP address.

Once the browser identifies the IP address of the computer hosting the requested URL, it sends an HTTP request. Once the host computer receives the HTTP request, it sends back an HTTP response with both the content and metadata about it. So one can say that HTTP is the messenger of the web which can fetch all types of components like web pages, images etc.

Another interesting thing is that HTTP is connectionless and stateless.

(New Jargon🎉) The connectionless part means that every time the web browser needs to load a new element, a new connection needs to be made (instead of keeping the connection open all the time — as most protocols do.) The stateless part means that the information shared between a client and a server to establish a connection is not stored anywhere and thus this information has to be shared again to establish the connection again.

The problem with HTTP is that it transmits information over cleartext — which means that anyone who has the technical skills to watch the traffic can see everything that is being transmitted (including usernames and passwords).

HTTP vs HTTPS

Clearly, the only difference between the two is a mere "S" but it stands for Secure. It uses cryptography for secure communication over a computer network and is widely used on the Internet. In HTTPS, the data is encrypted using Transport Layer Security (TLS) or, formerly, Secure Sockets Layer (SSL). To put it in even simpler terms, "S" secures the data transferring over the internet via encrypting it.

So you should be careful to use websites that have https instead of http in their URL because what if somebody tries to steal your cake recipe? 👀

Â