What is HTTP (Hypertext Transfer Protocol)?
Updated: Oct 27

HTTP (Hypertext Transfer Protocol) is the application protocol that gives web requests and responses their meaning. A browser or other client asks to interact with a resource, and a server answers with a status, metadata and, where appropriate, content. That content can be a web page, an image, a software download or data from an API. HTTP is used far beyond reading HTML documents.
The useful distinction is between what an exchange means and how its bytes travel. HTTP/1.1, HTTP/2 and HTTP/3 share core semantics, including familiar methods and status codes, while using different message formats and transport arrangements. HTTPS adds the required cryptographic protection for secure HTTP communication. Neither a newer HTTP version nor a faster broadband package guarantees that every page will become fast.
What happens when you request a web page?
Consider opening an HTTPS address for a guide. The URL identifies an origin and a target resource. The browser may already have reusable content, name-resolution information or a suitable connection. A fresh visit and a repeat visit can therefore follow different paths, even when the address is identical.
The client checks relevant local state and determines where the request needs to go. A usable cached response can sometimes satisfy it without a network exchange.
If an endpoint must be discovered, name resolution and other service information help locate it. Existing results may be reused rather than looked up again.
The client establishes or reuses a suitable connection. HTTPS over TCP uses TLS; HTTP/3 uses QUIC with integrated TLS 1.3 security.
The request identifies the resource and operation, with fields carrying relevant preferences, credentials or conditions.
An origin server or intermediary handles the request. A reverse proxy or eligible cache may answer or forward it.
The client interprets the response. The browser may then request styles, scripts, images and other resources before it can finish presenting the page.
DNS helps discover network endpoints; it does not transfer the page body. Likewise, a successful connection establishes a communication path, not proof that the application returned the correct content. Separating these stages is essential when a browser reports a connection error before it has received any HTTP response.
The IETF’s HTTP semantics standard, RFC 9110 from June 2022, defines the common resource, method and response model. RFC 9111 defines caching separately, while RFCs 9112, 9113 and 9114 describe HTTP/1.1, HTTP/2 and HTTP/3. These are complementary specifications rather than a rule that every deployment must use the highest version number.
The infographic traces an exchange, compares transport behaviour and shows why reusing a response is different from downloading it again. The bandwidth example isolates one component of delay rather than predicting a complete page-load time.

A resource is different from its representation
A resource is the thing addressed by the request. It might be a document, an image, a current reading or a collection of records. A representation is the transferable information describing its state. One resource can have representations in different formats or languages, selected through the application and HTTP negotiation rules.
For example, a resource representing a service’s current status might return JSON to an application. The JSON bytes are a representation, not the service itself. A later request can produce different content because the underlying state changed, even though both requests used the same method and address.
The method supplies the requested operation. The target identifies what it applies to. Header fields add information such as acceptable formats, authorisation, caching conditions and content metadata. Some messages carry content; others deliberately do not. A URL fragment, such as the section name after #, is handled by the client rather than sent as part of the HTTP request target.
What does an HTTP message look like?
HTTP/1.1 makes the message structure easy to illustrate as text: a starting line, header fields, an empty line and an optional body. The following is an illustrative request for a public resource at the reserved example domain. It is a wire-format explanation, not a command to paste into a shell.
GET /guide HTTP/1.1
Host: example.com
Accept: text/plain
An illustrative answer could contain the following fields and a 12-byte ASCII body. The empty line separates fields from content; Content-Length counts content octets, not the number of visible lines or the complete message size. Actual HTTP/1.1 wire lines use CRLF endings.
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 12
Hello, HTTP!
HTTP/2 and HTTP/3 carry the same kinds of meaning through binary frames and compressed field sections. They do not send this HTTP/1.1 starting line unchanged. Developer tools can show a readable reconstruction, so readable inspection output does not establish that the network used a textual message format.
Correct message boundaries matter for both reuse and security. HTTP/1.1 implementations must agree on where one message ends before interpreting the next. Conflicting framing information can create request-smuggling vulnerabilities when intermediaries disagree. Use maintained servers and proxies rather than attempting permissive, hand-written parsing.
Methods, safe requests and retries
A method’s defined semantics are more useful than treating its name as a guarantee about every server implementation. Safe means that the requested operation is essentially read-only. Incidental logging can still happen. Idempotent means that repeating the same request has the same intended server effect as making it once; it does not require identical replies.
Method | Meaning and retry implication |
|---|---|
GET / HEAD | Retrieve a representation, or its response metadata without response content. Both are safe and idempotent by semantics. |
POST | Ask the resource to process supplied content. Not generally idempotent; consult the application contract. |
PUT | Create or replace the target resource state with the supplied representation. Idempotent by semantics. |
DELETE | Remove the target resource’s association. Idempotent; a repeat may produce a different status. |
PATCH | Apply a patch document. Not inherently idempotent, although a particular patch operation can be designed that way. |
Idempotency becomes important when a request may have succeeded but its reply was lost. Repeating a state-setting PUT can preserve the intended effect. Repeating a POST that creates another job can create a duplicate unless the application supplies a suitable identity and recovery contract. A timeout alone cannot tell the client which effect already occurred.
Conditional requests can also prevent lost updates. An application can supply an ETag identifying the version it read, then require that version through If-Match when changing it. If another writer changed the resource first, the server can reject the stale precondition rather than silently overwriting newer work. This is distinct from retrying a request after a network interruption.
The table is deliberately not the complete method registry. HTTP is extensible. RFC 10008, published as a Proposed Standard in June 2026, adds QUERY for safe, idempotent queries with request content. A standard’s publication does not establish support in a particular browser, server, proxy or API; check the complete path before adopting an extension.
What an HTTP status actually tells you
The first digit groups a status: 1xx supplies interim information, 2xx reports successful handling, 3xx concerns redirection or related reuse decisions, 4xx reports a client-side request problem, and 5xx reports a server-side failure. The specific code, response fields and application contract determine what happens next.
Status or group | Practical interpretation |
|---|---|
200 / 202 / 204 | 200 OK has method-specific meaning. 202 Accepted means processing is not complete. 204 No Content carries no response content. |
301 / 302 / 307 / 308 | Redirection uses Location. Redirect semantics differ; 307 and 308 preserve the request method. |
304 Not Modified | A conditional retrieval can reuse its stored representation. The response contains no new body. |
401 / 403 / 404 | Authentication is required or failed; access is refused; or the resource was not found or not disclosed. Read the specific response. |
429 Too Many Requests | The service is rate-limiting requests. Retry-After may describe when to try again. |
502 / 503 / 504 | A gateway received an invalid upstream response; the service is unavailable; or a gateway timed out waiting upstream. |
Receiving a 504 means an HTTP-speaking component answered with that status. It differs from receiving no HTTP response because DNS resolution, the TLS handshake or a connection failed. Neither result alone identifies your ISP as the cause. Preserve the exact error and identify which component produced it.
A 202 response is especially easy to misread in automated systems. It confirms acceptance for processing, not completion of the requested job. The application needs a defined status resource, callback or other way to confirm the final outcome. Likewise, a 200 response containing an application error object may still require application-level handling.
HTTP/1.1, HTTP/2 and HTTP/3 compared
Version | Transport and useful distinction |
|---|---|
HTTP/1.1 | Usually TCP, with TLS for HTTPS. Text message framing; persistent connections are the default. No built-in multiplexed stream layer. |
HTTP/2 | TCP, commonly secured with TLS. Binary frames multiplex exchanges into streams and HPACK compresses field sections. |
HTTP/3 | QUIC over UDP, with TLS 1.3 security integrated into QUIC. Independent reliable streams and QPACK field compression. |
HTTP/1.1 does not require a new connection for every image. Persistent connections can carry multiple exchanges. Browsers can also use multiple connections for parallel work. Reuse saves setup work, but connection count, dependencies and server behaviour still affect how quickly useful content arrives.
HTTP/2 interleaves frames from several streams on one connection. This avoids requiring every request to wait behind a complete earlier response at the HTTP message layer. TCP still delivers one ordered byte stream: missing TCP data can hold up delivery for several active HTTP/2 streams until recovery.
HTTP/3 moves reliable stream delivery into QUIC. A gap affecting one stream need not stop delivery of already available data on another. UDP itself has not acquired reliability; QUIC provides acknowledgement, loss recovery, flow control and congestion control above it. Data still has to arrive in order within its own reliable stream.
This does not remove every shared bottleneck. Streams share connection capacity and congestion behaviour. Application dependencies can still force waiting, and QPACK field decoding can depend on compression-table information that has not arrived. HTTP/3 therefore reduces a particular transport ordering dependency without guaranteeing that every request becomes independent or faster.
Client and server support, protocol negotiation and the network path determine the version actually used. Blocking UDP can prevent QUIC from connecting; HTTP/3’s specification advises clients to attempt a TCP-based HTTP version in that situation. Do not weaken firewall or certificate protections simply to obtain a preferred version label.
Caching: three very different outcomes
The HTTP caching standard, RFC 9111, distinguishes storing a response from being allowed to reuse it. A browser cache is private to that user agent; a shared cache can serve multiple clients. Eligibility, the cache key, freshness and validation rules determine which response can be used for a particular request.
Fresh reuse: an eligible matching stored response can satisfy the request without contacting the origin. A local browser-cache hit may avoid the network request entirely.
Validation: a cache asks whether its stored representation is still valid, for example using If-None-Match with an ETag. A 304 answer lets it reuse the stored body and update relevant metadata.
Replacement: if the representation changed, a conditional retrieval can instead receive a 200 response with the new representation. The body is transferred again.
For an illustrative public response with Cache-Control: max-age=300, freshness lasts 300 seconds according to HTTP age calculations, not simply 300 seconds after every viewer opens it. Age and other metadata matter when an upstream cache already held the response. Vary can require matching selected request fields, so one URL need not map to one interchangeable cached representation.
Directive | Meaning in its unqualified response form |
|---|---|
no-cache | A cache must successfully validate before reusing the response. Storage is not simply forbidden. |
no-store | Directs caches not to store the request or response. It is not a substitute for encryption or trusted endpoints. |
private | A shared cache must not store the response. A private cache may store it subject to the other rules. |
An ETag is a validator, not necessarily a checksum the client can interpret or a promise of freshness by itself. A 304 avoids sending a replacement body, but it still involves a network exchange. A local fresh hit can avoid that exchange too. These are different savings and should not be combined into one vague “cache makes it faster” claim.
A CDN applies these ideas across delivery infrastructure, often alongside routing, security and application processing. A CDN can forward an uncached response or serve a reusable one. Sensitive and personalised responses need deliberate cache policy; a cookie’s presence alone is not a universal instruction that every cache must refuse storage.
Stateless HTTP can still support logged-in sessions
HTTP’s stateless design means that a request’s semantics can be understood independently of a particular preceding connection history. It does not prohibit a server from keeping a database, a shopping basket or a logged-in session. An application can associate a request with stored state using credentials or an identifier.
The basic cookie exchange uses a Set-Cookie response field and later Cookie request fields within the cookie’s permitted scope. The application decides what those values mean. Login state is therefore distinct from a TCP connection staying open, an HTTP/2 compression table or a QUIC connection being reused. Closing one connection does not necessarily log a user out.
HTTP and HTTPS: the security boundary
HTTPS protects HTTP communication in transit to the authenticated TLS endpoint. It helps prevent passive reading and undetected alteration on that protected connection. It does not establish that the site is honest, that its application is secure or that the final data is accurate. Plain HTTP lacks that transport protection.
Our HTTPS guide explains certificate and trust checks in more detail. For HTTP/3, TLS 1.3 is integrated into QUIC rather than being a separate TLS record layer over TCP. The security objective remains protected HTTP communication with the authorised endpoint.
A reverse proxy or CDN can terminate the client’s protected connection and establish a separate connection towards an origin. That operator can then process the decrypted HTTP data at the termination point. The protection is not automatically end-to-end secrecy from the browser to an application hidden behind every intermediary.
Early data can reduce setup waiting for a returning client, but TLS 1.3 and QUIC 0-RTT introduce replay considerations. Sending an arbitrary state-changing request early is not automatically safe. Maintain endpoint software, validate certificates and design authentication, authorisation and retry behaviour at the application layer.
Techie Broadband calculation: which delay can more bandwidth change?
Assume a hypothetical page needs 24 response bodies of 100 kB each, using decimal units. The total is 2.4 MB, or 19.2 Mbit. If body bytes alone could continuously fill a 40 Mbit/s bottleneck, their ideal serialisation time would be 19.2 divided by 40, or 0.48 seconds. At 80 Mbit/s it would be 0.24 seconds.
Doubling capacity saves 0.24 seconds in that isolated component. This calculation excludes request and framing overhead, name resolution, handshakes, congestion growth, contention, retransmission, server processing, browser work and resource dependencies. It is not a measured page-load result or a prediction for a UK broadband package.
Now isolate a different component: four dependent exchanges that each wait for one round trip before the next can begin. At an assumed 40 ms RTT, those waits total 160 ms; at 100 ms, they total 400 ms, before processing and body transfer. The dependency chain matters. Four concurrent independent requests would not create the same four sequential waits.
A newer HTTP version can change setup, multiplexing or loss behaviour; it cannot make a real application dependency disappear. A local fresh cache hit can remove a network exchange; a 304 generally removes a body transfer while retaining validation waiting. Smaller resources, correct reuse and less serial work can each affect a different part of the experience.
What this means on UK broadband
A responsive page depends on the whole path: device, browser, WiFi or Ethernet, router, access network, interconnection, serving endpoint and application. A strong headline speed result can coexist with slow HTTP responses if a distant server is busy or the browser waits for dependent scripts. A local wireless problem can also dominate an otherwise capable fibre service.
Latency under load can increase request waiting while uploads or downloads compete for a bottleneck. Compare a quiet connection with a busy one and compare WiFi with an appropriate wired test where possible. These comparisons identify patterns; they do not by themselves prove which queue, network or application caused them.
Inspect an HTTP exchange without guessing
In browser developer tools, the Network panel can show the request URL, method, status, protocol, response fields, transfer size and timing. Open it before reproducing the problem so the relevant requests are captured. Look at the specific slow resource rather than treating the entire page as one undifferentiated download.
Confirm the exact failed request and whether an HTTP status arrived. Separate name-resolution and security failures from application responses.
Inspect the negotiated protocol rather than inferring it from the browser version or HTTPS scheme.
Check whether the response came from a local cache, a service worker, a shared cache or a network transfer where the tool exposes that information.
Compare connection setup, waiting for the response and reading the content. A long wait for the first byte can include network and server work.
Inspect redirects and the initiator chain. A resource discovered late cannot start early merely because spare bandwidth exists.
Repeat a controlled comparison with the same resource and record cache state, connection reuse, network load and device conditions. Do not present one run as a universal benchmark.
The official curl manual documents a command-line alternative. This Unix-shell example performs one ordinary GET to example.com, prints response fields and discards the body. It sets a 20-second overall transfer limit and does not bypass certificate verification. It does not follow redirects automatically, so a redirect response remains visible.
curl --max-time 20 --dump-header - --output /dev/null https://example.com/
A separate run can report the selected protocol, response code and cumulative timings. These documented options are not a claim that a particular runtime result was measured for this article. On Windows, use curl.exe when the shell’s curl name refers to another program, and use NUL instead of /dev/null with the appropriate shell quoting.
curl --max-time 20 --output /dev/null --write-out 'code=%{http_code} version=%{http_version} first_byte=%{time_starttransfer}s total=%{time_total}s\n' https://example.com/
curl’s time_starttransfer is measured from the start of that transfer, including preceding connection and preparation work. It is not simply server CPU time, and it is not directly interchangeable with every browser panel’s differently scoped TTFB display. A command-line client also lacks the browser’s complete rendering, extension, session and service-worker environment.
Treat captures and copied diagnostic output carefully: real requests can contain session cookies, authorisation fields and private query data. Share only the information needed to explain the failure. For a timeout during a state-changing request, inspect the application’s actual outcome before retrying; a successful connection test does not settle that uncertainty.
HTTP questions answered
Is HTTP the same as the internet?
No. HTTP is one application protocol carried over network infrastructure. It defines web-style request and response semantics. IP routing, DNS, transport protocols, WiFi, Ethernet and your broadband access service perform different jobs.
Does HTTPS mean HTTP/2 or HTTP/3?
No. HTTPS identifies protected HTTP communication, not a single HTTP version. HTTP/1.1 and HTTP/2 can use TLS over TCP, while HTTP/3 uses QUIC with integrated TLS 1.3. Inspect the negotiated protocol to identify the actual version.
Is HTTP/3 unreliable because it uses UDP?
No. QUIC supplies reliable stream delivery and loss recovery above UDP. HTTP/3 uses those streams for exchanges. Reliability still has practical limits, including timeouts, connection failure and application-level uncertainty about an operation’s outcome.
Will a faster package fix a slow website?
It can help when your available transfer capacity is the relevant constraint. It cannot directly eliminate server processing, serial application dependencies, device work or every source of delay. Inspect which part of the exchange is slow before drawing that conclusion.
Key takeaway
Understand HTTP through the exchange: which resource was requested, what the method asked for, which component answered, what the status established and whether the content was transferred or reused. Then inspect the transport, security boundary and timing. That model explains far more than assuming that a version number, status code or headline broadband speed tells the whole story.

