HTTP (Hypertext Transfer Protocol)
HTTP (Hypertext Transfer Protocol) is a protocol used for transmitting data over the internet. It is the foundation of the World Wide Web and enables the communication between web browsers and servers.
When a user requests a web page using a browser:
This exchange of requests and responses is the foundation of how the web works and is at the centre of web development.
The two properties of the HTTP protocol listed below drive the development of other tools and techniques, such as caching mechanisms, security protocols, and content delivery networks, which help optimize the performance and functionality of HTTP-based systems.
Stateless
Being "stateless" means the HTTP protocol does not maintain any information about the client or previous requests and responses between different requests. Each request and response is independent, and the server does not retain any knowledge of the client's state.
Authentication is a process of identifying the user, which is typically done by requesting a username and password. Because HTTP is stateless, the server cannot rely on the client's state to keep track of whether a user is logged in or not. To maintain the state, several methods have been developed, such as:
All these methods help maintain the state of the authentication process and allow the server to identify the user between requests even though the HTTP protocol is stateless.
Text-based
HTTP is a text-based protocol, which means that the requests and responses are sent in the form of plain text. The text format is human-readable and easy to understand, but it also means that the information can be read by anyone who intercepts the request or response.
To handle security, several methods have been developed, such as:
Recommended by LinkedIn
These methods help protect the data being sent and received over the network and prevent unauthorized access to sensitive information.
It's important to note that even HTTPS does not guarantee total security, it's just an encryption layer on top of the HTTP protocol, and it can still be vulnerable to attacks such as MITM(Man-in-the-middle) attacks, which is why it's recommended to use it in conjunction with other security measures.
HTTP Response Codes
HTTP Response Codes are fundamental artefacts in client-server communication under the HTTP protocol. They provide a standardized way for the server to communicate the status of a request to the client and are grouped into five classes based on the first digit of the code. These classes provide a general indication of the status of the request, including whether it was successful, if further action is required, or if there was an error. The HTTP response codes are crucial for ensuring the reliability and functionality of HTTP-based systems, as they allow the client to make informed decisions about how to proceed based on the status of the request. Understanding the different classes of HTTP response codes and their meanings is essential for developing and maintaining successful HTTP-based systems.
HTTP Response Codes are grouped into five classes:
HTTP2
HTTP 1.1 is the most widely used version of the HTTP protocol and includes features such as persistent connections, caching, and support for multiple request methods (e.g. GET, POST, etc.).
HTTP 2 is an improvement over HTTP 1.1. It was designed to address some of the shortcomings of the earlier version, such as high latency and head-of-line blocking. It introduces new features like:
HTTP/2 introduced several new features and improvements that have made some tools and techniques of web development obsolete or less necessary. Some examples include:
It's important to note that these techniques are not completely useless, but with the advent of HTTP2, they're not as critical as they used to be.