Nearly everyone in the world has heard of HTTP or HTTPS. It appears when we load pages on the Internet, like https://hexlet.io.
HTTP is a language or protocol. Developers of browsers, servers, websites, mobile applications and ordinary programs have agreed to use it to exchange data over the network.
Thanks to this, we can use different browsers and open sites without worrying about whether they're suitable for each other. Imagine if there was only one way to charge all devices. That would be cool, right?
HTTP works according to the client-server model. It means that during an interaction, there are two sides:
- The client that requests data (our browser plays this role)
- The server that responds to the request
Every time we enter a website address or click on a link:
- We send a new request to the server
- The server generates an HTML page and returns it to the browser
- The browser displays the page for us
Quite the same thing happens with mobile applications, although that's hidden from us. The data and logic of most applications are on the server, and the application accesses it when required.
HTTP permeates the entire development from beginning to end, whether it is the backend or frontend-development. Any web developer will write code that executes HTTP requests or generates HTTP responses as the simplest sites do. Knowledge of HTTP is part of the foundation that any web programmer in the modern world should have.
What is it so important? Here are some things you can do better knowing how HTTP works:
- Caching. A technique to speed up computing and save resources, affecting the performance of web applications
- Debugging. The ability to quickly find the source of a problem and eliminate it
- Efficiency. The latest versions of the protocol allow efficient use of communication channels
- Security. Servers constantly pass through the network client's sensitive data, such as passwords, keys, personal information. You can keep them private only by knowing how HTTP works
- Design and architecture. Proper use of HTTP allows you to make the behavior of sites and applications much more predictable, error-resistant, and easy to maintain
- Cookies and authentication. The ability of sites to remember users is also based on the capabilities of HTTP
This course introduces HTTP at the most fundamental level. This way, it doesn't depend on the language, browser, or technology used. Here we will learn how to set up the protocol and use it correctly.
Are there any more questions? Ask them in the Discussion section.
The Hexlet support team or other students will answer you.
For full access to the course you need a professional subscription.
A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.