The Hypertext Transfer Protocol is used to load pages on the Internet using hyperlinks.
After reading this article you will be able to:
Related Content
Subscribe to theNET, Cloudflare's monthly recap of the Internet's most popular insights!
Copy article link
The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used to load webpages using hypertext links. HTTP is an application layer protocol designed to transfer information between networked devices and runs on top of other layers of the network protocol stack. A typical flow over HTTP involves a client machine making a request to a server, which then sends a response message.
An HTTP request is the way Internet communications platforms such as web browsers ask for the information they need to load a website.
Each HTTP request made across the Internet carries with it a series of encoded data that carries different types of information. A typical HTTP request contains:
Let’s explore in greater depth how these requests work, and how the contents of a request can be used to share information.
An HTTP method, sometimes referred to as an HTTP verb, indicates the action that the HTTP request expects from the queried server. For example, two of the most common HTTP methods are ‘GET’ and ‘POST’; a ‘GET’ request expects information back in return (usually in the form of a website), while a ‘POST’ request typically indicates that the client is submitting information to the web server (such as form information, e.g. a submitted username and password).
HTTP headers contain text information stored in key-value pairs, and they are included in every HTTP request (and response, more on that later). These headers communicate core information, such as what browser the client is using and what data is being requested.
Example of HTTP request headers from Google Chrome's network tab:
The body of a request is the part that contains the ‘body’ of information the request is transferring. The body of an HTTP request contains any information being submitted to the web server, such as a username and password, or any other data entered into a form.
An HTTP response is what web clients (often browsers) receive from an Internet server in answer to an HTTP request. These responses communicate valuable information based on what was asked for in the HTTP request.
A typical HTTP response contains:
Let's break these down:
HTTP status codes are 3-digit codes most often used to indicate whether an HTTP request has been successfully completed. Status codes are broken into the following 5 blocks:
The “xx” refers to different numbers between 00 and 99.
Status codes starting with the number ‘2’ indicate a success. For example, after a client requests a webpage, the most commonly seen responses have a status code of ‘200 OK’, indicating that the request was properly completed.
If the response starts with a ‘4’ or a ‘5’ that means there was an error and the webpage will not be displayed. A status code that begins with a ‘4’ indicates a client-side error (it is very common to encounter a ‘404 NOT FOUND’ status code when making a typo in a URL). A status code beginning in ‘5’ means something went wrong on the server side. Status codes can also begin with a ‘1’ or a ‘3’, which indicate an informational response and a redirect, respectively.
Much like an HTTP request, an HTTP response comes with headers that convey important information such as the language and format of the data being sent in the response body.
Example of HTTP response headers from Google Chrome's network tab:
Successful HTTP responses to ‘GET’ requests generally have a body which contains the requested information. In most web requests, this is HTML data that a web browser will translate into a webpage.
Keep in mind that HTTP is a “stateless” protocol, which means that each command runs independent of any other command. In the original spec, HTTP requests each created and closed a TCP connection. In newer versions of the HTTP protocol (HTTP 1.1 and above), persistent connection allows for multiple HTTP requests to pass over a persistent TCP connection, improving resource consumption. In the context of DoS or DDoS attacks, HTTP requests in large quantities can be used to mount an attack on a target device, and are considered part of application layer attacks or layer 7 attacks.
儿童吃什么 | 白芽奇兰是什么茶 | 轻断食是什么意思 | 开通花呗有什么风险 | 百香果什么时候开花结果 |
驴胶补血颗粒什么时候喝最好 | 吃什么能降低尿蛋白 | 5月24日是什么星座 | 泄泻是什么意思 | 胎盘成熟度0级什么意思 |
cvm是什么意思 | 肾衰竭有什么症状 | 天葵是什么 | 话唠是什么意思 | 什么是低密度脂蛋白胆固醇 |
庶子是什么意思 | guou是什么牌子的手表 | 五月二十八是什么日子 | 肝脂肪浸润是什么意思 | 老烂腿抹什么药膏最好 |
款款是什么意思hcv7jop4ns6r.cn | 山葵是什么hebeidezhi.com | 梦见自己儿子死了是什么意思hcv9jop7ns4r.cn | 干燥综合征挂什么科hcv7jop6ns2r.cn | 大腿粗是什么原因导致的hcv7jop9ns3r.cn |
端粒是什么hcv9jop4ns2r.cn | 艮宫代表什么hcv9jop3ns1r.cn | rimowa是什么品牌mmeoe.com | 卵巢囊肿吃什么药好得最快liaochangning.com | 茯茶属于什么茶hcv8jop0ns9r.cn |
神经损伤吃什么药最好hcv9jop1ns3r.cn | 眼泡是什么意思hcv8jop3ns0r.cn | 舌头发苦是什么原因造成的hcv7jop6ns5r.cn | 胃穿孔是什么原因引起的hcv9jop4ns6r.cn | 中药什么时间喝效果最好hcv8jop9ns8r.cn |
避重就轻是什么意思xscnpatent.com | 2003年属羊是什么命baiqunet.com | 不骄不躁是什么意思hcv9jop0ns1r.cn | 7月6日是什么星座hcv8jop4ns8r.cn | 焘是什么意思hcv8jop3ns9r.cn |