Hypertext Transfer Protocol
HTTP/1.1 is the most-used version today, and RFC 2616 completely explains how it should work. As of April 2023, about 39% of websites[1] already use the next version, HTTP/2 (which works in nearly all web browsers), and over 27% of websites[2] already work with the newest version, HTTP/3, which came out in 2022.[3] HTTP/3 is faster for most webpages in the real world. It is faster than both HTTP/2 and HTTP/1.1, sometimes more than three times as fast as HTTP/1.1.[4] HTTPSThe secure variant of HTTP is called HTTPS (Hypertext Transfer Protocol Secure), and is used by more than 79% of websites,[1] such as payment websites (if it's not used, then it's a clear signal that the payment site is a scam). HTTPS is used by default by most web browsers (even if not requested by the user), assuming the web server supports it. If browsing to a website, and the web browser shows it starting with HTTP works as such, a user agent, usually meaning the web browser, connects to a (web) server. A user agent could also be a web crawler, or so-called "spider", but most users do not use such tools (they are used by search engines, such as Google). The server must be located using a URL or URI. It normally connects to port 80 on a computer. Request message![]() The request message (for HTTP/1.1 and older) contains the following (i.e. it's in plain text; no longer used with HTTP/2 and later):
The request line and headers must all end with two characters: a carriage return followed by a line feed, often written <CR><LF>. The empty line must consist of only <CR><LF> and no other whitespace. In the HTTP/1.1 protocol, all headers except A request line containing only the path name is accepted by servers to maintain compatibility with HTTP clients before the HTTP/1.0 standard. References
|