kids encyclopedia robot

HTTP facts for kids

Kids Encyclopedia Facts
Quick facts for kids
HTTP
HTTP logo.svg
International standard
  • RFC 1945 HTTP/1.0
  • RFC 9110 HTTP Semantics
  • RFC 9111 HTTP Caching
  • RFC 9112 HTTP/1.1
  • RFC 9113 HTTP/2
  • RFC 7541 HTTP/2: HPACK Header Compression
  • RFC 8164 HTTP/2: Opportunistic Security for HTTP/2
  • RFC 8336 HTTP/2: The ORIGIN HTTP/2 Frame
  • RFC 8441 HTTP/2: Bootstrapping WebSockets with HTTP/2
  • RFC 9114 HTTP/3
  • RFC 9204 HTTP/3: QPACK: Field Compression
Developed by Initially CERN; IETF, W3C
Introduced 1991; 35 years ago (1991)

HTTP, which stands for Hypertext Transfer Protocol, is like the main language computers use to talk to each other on the World Wide Web. It's how your web browser asks for information from a web server and how the server sends that information back to you. Think of it as the rules for sending messages across the internet.

When you click a hyperlink or type a website address, your browser (the client) sends an HTTP request to a server. The server then finds the information you asked for, like an HTML page or an image, and sends it back to your browser as an HTTP response. This is called the client–server model.

Many different programs act as clients, not just web browsers. For example, web crawlers (used by search engines) and mobile apps also use HTTP to get web content.

HTTP also uses special helpers like web caches and proxy servers. Caches store copies of web pages to make them load faster. Proxies help connect your computer to the internet, especially if you're on a private network. These helpers make the internet work more smoothly and quickly for everyone.

Every piece of information on the web has a unique address called a uniform resource locator (URL). These URLs often start with "http://" or "https://" (for secure connections), telling your browser how to find the resource using HTTP.

How HTTP Has Changed Over Time

HTTP has been updated many times to make the web faster and more efficient. Each update gets a new version number.

Version Introduced Status
0.9 1991 Old
1.0 1996 Old
1.1 1997 Standard
2 2015 Standard
3 2022 Standard

HTTP/1.0 and HTTP/1.1: Making Connections Faster

In the early days, with HTTP/1.0, your browser had to make a brand new connection to the server for every single thing it wanted to download, like each image or part of a web page. This was slow!

HTTP/1.1, released in 1997, was a big improvement. It allowed your browser to reuse the same connection for many requests. Imagine asking for several books from a library; with HTTP/1.0, you'd go to the library, get one book, leave, then come back for the next. With HTTP/1.1, you can stay in the library and ask for all the books you need in one visit. This made web pages load much faster.

HTTP/2: Even More Speed and Efficiency

HTTP/2, which came out in 2015, made things even quicker. It introduced several smart ways to speed up communication:

  • It compressed the "headers" (small pieces of information about your request), making them much smaller.
  • It used just one main connection to the server for everything, instead of several.
  • It could send many requests and responses at the same time over that single connection, like having multiple conversations at once.
  • It allowed servers to "push" content to your browser before you even asked for it, if the server thought you'd need it soon.

HTTP/3: The Latest and Fastest

The newest version, HTTP/3, became a standard in 2022. It uses a different way to send data called QUIC (instead of TCP). Think of it as a new, super-efficient delivery truck for your web data. This helps web pages load even faster and more smoothly, especially on mobile devices or when your internet connection isn't perfect.

How HTTP Versions Are Used Today

Most websites and web browsers today use the newer versions of HTTP to give you the best experience.

Widespread Use of HTTP/2 and HTTP/3

HTTP/2 is used by a large number of websites and almost all web browsers. This means when you browse the internet, you're very likely using HTTP/2 without even knowing it.

HTTP/3, the newest version, is also becoming very popular. It's used by over a third of websites and supported by most web browsers. It helps pages load even quicker than HTTP/2, sometimes three times faster than the older HTTP/1.1.

The Importance of HTTPS

You might have noticed that many website addresses start with "HTTPS" instead of just "HTTP". The "S" stands for "Secure". HTTPS is a special, encrypted version of HTTP. It keeps your information safe and private when you send it over the internet, like when you log into a website or make an online purchase. More than 85% of websites now use HTTPS to protect your data.

How HTTP Works

HTTP relies on other internet rules to send information.

Sending Data Safely

Before HTTP/3, HTTP usually used a reliable system called Transmission Control Protocol (TCP) to send data. TCP makes sure all data packets arrive in the right order and without errors.

HTTP/3 uses a newer system called QUIC, which works with User Datagram Protocol (UDP). QUIC is designed to be even faster and handle internet issues better, especially on mobile networks.

Keeping Track of Your Visit

HTTP is a "stateless" protocol. This means the server doesn't remember what you did on your last visit or even your last click. Each request is treated as brand new.

To remember things about you, like if you're logged in, websites use HTTP cookies. Cookies are small pieces of information stored on your computer. They help websites remember your preferences or keep you logged in as you move from page to page.

Getting Only What You Need

Older HTTP versions always sent the entire web page or file you asked for. Newer versions are smarter:

  • Conditional Requests: Your browser can ask the server, "Has this page changed since I last saw it?" If not, the server tells your browser to use the saved copy, saving time and data.
  • Compressed Content: Websites can send compressed versions of pages, making them smaller and faster to download. Your browser then uncompresses them.
  • Chunked Transfer: If a server doesn't know how big a file is (like a live video stream), it can send it in small "chunks." Your browser gets each chunk as it becomes ready.
  • Byte Range Serving: This lets your browser ask for only a specific part of a file. This is useful if you're resuming a download or only need to see a small section of a very large document.

How Websites Keep You Logged In

Sometimes, a website needs to know who you are to show you special content. HTTP has ways to handle this:

  • HTTP Authentication: This is a built-in way for the server to ask for a username and password before showing you a page.
  • Secure Connections (HTTPS): As mentioned, HTTPS encrypts your connection, making sure that your login details and other private information are kept secret from others.

How HTTP Messages Look

HTTP messages are the actual requests and responses sent between your browser and a server.

Message Parts

An HTTP message has two main parts:

  • Header: This is like the envelope of a letter. It contains important information about the message itself, such as what kind of content is inside, who sent it, and what language it prefers. Headers are usually plain text.
  • Body: This is the actual content, like the letter inside the envelope. It could be an HTML page, an image, a video, or anything else. The body can be in any format.

Request Messages

When your browser asks for something, it sends a request message. This message includes:

  • Method: This tells the server what kind of action you want to perform. For example, "GET" means you want to retrieve information, and "POST" means you want to send information (like filling out a form).
  • URL: The address of the resource you want.
  • HTTP Version: Which version of HTTP your browser is using.
  • Request Headers: Extra details about your request, like what type of files your browser can accept.
Properties of request methods
Method RFC Request has
payload body
Response has
payload body
Safe Idempotent Cacheable
GET RFC 9110 Optional Yes Yes Yes Yes
HEAD RFC 9110 Optional No Yes Yes Yes
POST RFC 9110 Yes Yes No No Yes
PUT RFC 9110 Yes Yes No Yes No
DELETE RFC 9110 Optional Yes No Yes No
CONNECT RFC 9110 Optional Yes No No No
OPTIONS RFC 9110 Optional Yes Yes Yes No
TRACE RFC 9110 No Yes Yes No
PATCH RFC 5789 Yes Yes No No No

Safe Methods: Just Looking, Not Changing

A method is called safe if it doesn't change anything on the server. For example, when you use the "GET" method to view a web page, you're just looking at information. It's like reading a book; you don't change the book itself. "GET", "HEAD", "OPTIONS", and "TRACE" are safe methods.

It's important for websites to use safe methods correctly. If a website allowed you to delete something just by visiting a link (a "GET" request), a search engine or a web accelerator could accidentally delete your content! This actually happened once with Google Web Accelerator, which caused problems by deleting things without users meaning to.

Idempotent Methods: Doing It Once Is Enough

A method is idempotent if doing the same request multiple times has the same result as doing it just once. For example, if you use "DELETE" to remove a file, and then try to delete it again, the result is the same: the file is gone. "PUT" and "DELETE" are idempotent.

Methods like "POST" are not always idempotent. If you click a "submit" button twice, you might accidentally send the same information twice, like ordering two of the same item. Websites need to be designed to prevent these kinds of accidental double actions.

Response Messages

After the server gets your request, it sends back a response message. This includes:

  • HTTP Version: The HTTP version the server used.
  • Status Code: A three-digit number that tells you if the request was successful or if there was a problem. For example, "200 OK" means everything worked, and "404 Not Found" means the page couldn't be found.
  • Reason Phrase: A short, human-friendly explanation of the status code (e.g., "OK" or "Not Found").
  • Response Headers: Extra details from the server, like when the page was last changed or what type of content is being sent.
Http request telnet ubuntu
An HTTP/1.1 request made using telnet. The parts of the transaction are shown in different colors: request in red, response header in purple, and response body in green.

Here's a simple example of an HTTP request and response:

GET / HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

This is what your browser might send to ask for the main page of example.com.

HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 155
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
ETag: "3f80f-1b6-3e1cb03b"
Accept-Ranges: bytes
Connection: close

<html>
  <head>
    <title>An Example Page</title>
  </head>
  <body>
    <p>Hello World, this is a very simple HTML document.</p>
  </body>
</html>

And this is the server's response, saying "200 OK" (success!) and sending the HTML content of the page.

The History of HTTP

HTTP was invented by Tim Berners-Lee and his team at CERN in the late 1980s and early 1990s. He also created HTML and the idea of the World Wide Web. HTTP was designed to help people easily share information and link documents together.

Early Days: HTTP/0.9

The very first version, HTTP/0.9, was very simple. It came out in 1991 and could only "GET" (retrieve) basic HTML documents. It didn't have many of the features we see today.

HTTP/1.0 and HTTP/1.1 Development

As the web grew, more features were needed. The Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C) worked together to create new versions.

HTTP/1.0 was officially released in 1996. It added more features like different file types and the ability to send more information in the headers.

HTTP/1.1 followed quickly in 1997. It brought major improvements, like keeping connections open for multiple requests, which made browsing much faster. Web browsers and servers quickly adopted these new features.

The Road to HTTP/2

In 2009, Google created a new protocol called SPDY to make web traffic even faster. Many of its ideas, like sending multiple requests over a single connection, were very successful.

Because of SPDY's success, the HTTP Working Group decided to create a new official HTTP version based on these ideas. This led to the release of HTTP/2 in May 2015, which brought significant speed and efficiency upgrades to the web.

The Latest: HTTP/3

Work continued to make the web even faster. In 2020, the first drafts of HTTP/3 were published. This version uses a completely new transport protocol called QUIC to improve speed and reliability. On June 6, 2022, HTTP/3 became an official standard.

See also

Kids robot.svg In Spanish: Protocolo de transferencia de hipertexto para niños

Black History Month on Kiddle
Famous African-American Architects:
Georgia Louise Harris Brown
Julian Abele
Norma Merrick Sklarek
William Sidney Pittman
kids search engine
HTTP Facts for Kids. Kiddle Encyclopedia.