Back

HTTP

Idealogic’s Glossary

HTTP (Hypertext Transfer Protocol) is the most common protocol that is used for the transfer of data in the internet. It prescribes the manner in which hypertext will be transferred particularly the HTML documents from one web browser to another or from the browser to the server and back for browsing, loading and interaction on websites. Http is a protocol that employs a client-server model of the communication whereby through making a request of the server, the server returns a resource or an error message.

Key Characteristics of HTTP

Request-Response Model: HTTP uses the simple request response model which is the model of usage of HTTP. For instance if the user is using a web based application to perform a task then the client sends an HTTP request to the server then the server through the network protocol also sends an HTTP response This may contain the data requested by the client or an error message. This model is very important in navigation of the internet and the access to the information on the internet.

Stateless Protocol: Another concern HTTP is stateless, and each request made is not connected to any other in anyway. The server does not contain any history of the interactions and thus the protocol is quite simple to develop and use but in a case when the information should be kept, for example data about user’s login or items in the shopping cart, it is necessary to use cookies or sessions.

Text-Based Communication: HTTP messages that are both request and response are in text format that is also readable by a human being. This is a characteristic that makes the HTTP protocol quite easy to understand and if one has to debug the protocol there are tools such as the browser developer’s console or network analyzers that can be used.

HTTP Methods (Verbs)

HTTP has several methods which describe what has to be done with a resource:

GET: Provides for the task of fetching data from the server.

POST: Used in sending information to the server to be processed.

PUT: This will create a new resource if the resource is not existing in the server otherwise it will update the resource.

DELETE: This function enable a resource to be removed from the server.

HEAD: Similar to GET but the response body is not returned but the headers are returned.

OPTIONS: Offers the information on the techniques that can be used for the communication with the target resource.

HTTP Status Codes

The http response has a status code which show the outcome of the request that was made.

1xx (Informational): The operation is in progress.

2xx (Success): The request was made and has been received and noted (e. g. 200 OK).

3xx (Redirection): Further action is needed; for example, 301 Moved Permanently.

4xx (Client Error): This means a situation whereby the request is not well made or can in any way cannot be answered (for instance when one is taken to a page that says the page you are looking for has been removed or is not available).

5xx (Server Error): The request was not completed as it should be by the server (e. g. , 500 – Internal Server Error).

Evolution of HTTP

HTTP/0. 9: The first version was released in 1991 and despite the fact that it supported only GET method and no header, this version was targeted at fetching of HTML documents.

HTTP/1: It was released in 1996 and contain headers, the methods POST and HEAD, as well as content types support.

HTTP/1. 1: It emerged in 1997, the HTTP/1. Some of the new features it introduced include: Squid supports such features as persistent connections, chunked transfer encoding and more flexible caching mechanisms. It is still in use to this date.

HTTP/2: A improvement from HTTP/1. HTTP/2 that was ratified in 2015 introduced such improvements that aimed at increasing performance for instance the use of multiplexing where multiple requests and responses could be sent and received at the same time, use of header compression, and better methods of security. As of now, the latest version of HTTP is HTTP/3 which employs QUIC transport protocol and not the TCP. It is mainly focused on the reduction of latency and improvement of throughput especially in the mobile and high latency networks.

Applications of HTTP

Web Browsing: HTTP is one of the largest protocols that help in the loading and the use of the websites by the users. Among the most used web browsers, we have Chrome, Firefox, Safari and Edge that use HTTP to communicate the browser with the server.

APIs: HTTP is commonly used in the APIs (Application Programming Interfaces) where RESTful APIs are the current most common approach to the interaction between the client and the server in web services.

Web Services and Microservices: HTTP is the most used protocol in the Web services and microservices architectures to allow the interaction between the different components of an application through the network.

Content Delivery Networks (CDNs): CDNs use the HTTP protocol to deliver content like images, videos and static files to the users from various servers depending on the location of the users and this make it fast in delivering the content.

Security Considerations

HTTPS: HTTP has its secure version and that is HTTPS. It employs TLS (Transport Layer Security) to protect the information that is being transferred between the client and server so that the login details, as well as the payment details, cannot be captured or altered.

Authentication: HTTP has several schemes that can be used for authentication, for example Basic Authentication, Digest Authentication, but also more advanced ones like OAuth, to ensure that only the right people get to the right things.

Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF): It is therefore crucial that HTTP applications are designed in a manner that makes them difficult to fall prey to threats such as the XSS and the CSRF that the attackers use to inject code or make the application perform actions that are undesirable.

Conclusion

HTTP (Hypertext Transfer Protocol) is the most common protocol that is employed in the transfer of data on the WWW. It operates on the request-response model to support web page request, APIs as well as many other features. Over the years, HTTP has improved in its functionality, design and security due to the introduction of new versions which include HTTP/2 and HTTP/3. HTTP is still the basic component of the web interaction and remains the most important element in the work of the Internet as a whole, on which a vast number of activities and services depend that millions of people use today.