GET vs POST: The Real Truth Behind Their Differences
This article explains the basic concepts of GET and POST, debunks common interview answers, reveals that both methods are fundamentally TCP connections, discusses browser and server limits, and highlights the practical impact of their packet‑level differences.
GET vs POST – conceptual differences
GET parameters are placed in the request URL; POST parameters are placed in the request body.
GET URLs can be bookmarked, shared and stored in browser history; POST requests cannot be bookmarked because the data is not in the URL.
Browsers cache GET responses by default (subject to Cache‑Control headers); POST responses are not cached unless explicitly allowed.
GET requests are limited by URL length (most browsers ~2 KB, most servers ~64 KB); POST bodies can be much larger, limited only by server configuration and available memory.
GET data is sent using URL‑encoding (ASCII‑compatible); POST supports multiple encodings (e.g., multipart/form‑data, application/json, application/x‑www‑form‑urlencoded).
Because parameters appear in the URL, GET is unsuitable for transmitting sensitive information; POST hides data in the body, offering better confidentiality when used over HTTPS.
Underlying protocol
Both GET and POST are HTTP request methods that run on top of the same TCP/IP transport. The TCP connection is identical regardless of the method; the only protocol‑level distinction is where the HTTP specification expects the payload (URL vs. body). Technically a client may include a request body with a GET or URL parameters with a POST, and the TCP layer will treat them as ordinary packets.
Browser and server constraints
Typical browsers impose a URL length limit of about 2 KB. Exceeding this limit may cause the request to be truncated or rejected.
Many web servers reject URLs larger than roughly 64 KB. This limit is enforced by the server, not by the HTTP standard.
Because POST data resides in the body, it bypasses these URL length limits, but servers may still enforce a maximum request‑body size (e.g., Apache’s LimitRequestBody, Nginx’s client_max_body_size).
Some servers will read a body attached to a GET request, but behavior is inconsistent and should not be relied upon.
Network round‑trip behavior
In practice the exchange pattern differs:
GET : The client sends the request line, headers, and any URL‑encoded data in a single packet (or a small series). The server replies with a 200 OK response containing the payload.
POST : The client often sends only the request line and headers first. If the server returns a 100 Continue interim response, the client then sends the body. Finally the server returns a 200 OK response. This results in two TCP round‑trips, adding latency.
Not all browsers follow the two‑step pattern; for example, Firefox may transmit the entire POST (headers + body) in one packet.
Practical implications for developers
Use GET for safe, idempotent operations that retrieve data and can be cached or bookmarked.
Use POST for operations that modify server state, require larger payloads, or need to transmit data that should not appear in URLs.
Respect the semantic meaning of each method; swapping them arbitrarily can break caching, security policies, and RESTful design.
On high‑latency or unreliable networks, the extra round‑trip of POST may provide robustness (e.g., the 100 Continue handshake), but on fast networks the overhead is usually negligible.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
