The Hypertext Transfer Protocol (HTTP) is the set of instructions that govern how applications transfer information on the World Wide Web. Information on the World Wide Web is presented in documents (commonly known as web pages) that contains hypertext (commonly known as links) that you click on to get information from another document on the World Wide Web, hence the name.
After your browser resolves a domain name’s IP address through the Domain Name System (DNS), your browser will need to communicate with the web server at that IP address to transfer information necessary to load the web page in your browser window. In order to load the web page, your browser will make a series of HTTP requests to the web server.
HTTP is an asymmetric request-response protocol. This means that the client (which usually refers to your web browser) requests information from the web server, and the web server will respond with the requested information. Therefore, HTTP is a pull protocol because information can only be pulled from the web server following a client’s request. The web server does not push information to a client without a request.
There are different HTTP request methods, but two of them are the most common: “GET” and “POST”. For “GET” requests, the browser asks the web server to send information over (for example, to load a web page), while for “POST” requests, the browser says it wishes to some data over to the web server (for example, the username and password that has been entered in a form inside a browser window).
In a HTTP “POST” request, the information that the web browser passes to the web server, such as the values of the username and password entered into a form (or any other information entered into other fields in the form), is sent inside the HTTP request body.
When a web server responds to a browser’ HTTP request, it first returns a status code to the browser. What the HTTP status code is is a three-digit code that indicates the results of the HTTP request. One of the most famous HTTP status codes that you may have come across is the “404 Not Found” error, which usually results from the web page being moved or deleted on the server. HTTP status codes are divided into five categories, each beginning with a different digit:
Finally, in the HTTP response body, if the HTTP response status code indicates success (e.g. code 200 as shown in the above header) the information returned in the HTTP response body will contain the HTML instructions for the browser to format the information on the page (text, images, colors, positions etc) for display in the browser window.
HTTP is also known as a stateless protocol because each connection between the client and web server is terminated after transacting. When the same client opens a new connection to the server right after the previous has been terminated, the web server does not remember anything about the previous connection. In order to preserve the information from previous connections, cookies can be used to temporarily store session information.
DNS is a protocol that resolves names (such as bunny.net) to computer IP addresses (like 22.214.171.124) that your computer can use to contact other servers to obtain information or data
HTTP is a protocol used to connect to web servers by web browsers to request content to view. This is also used to transfer larger files, and is often used for software updates.
DNS resolver is a service used by a client or computer to resolve domain names into network addresses.