HTTP Protocol and Web Fundamentals Questions

HTTP semantics that underpin web and API behavior: methods (safe vs idempotent, retries), the status codes that drive caching, conditional and range behavior, request and response headers, content negotiation and Vary, HTTP caching (Cache-Control, private vs shared caches, ETag, conditional requests), cookies and credentialed cross-origin requests (SameSite, CORS and preflight at the header level), large responses (range requests, resuming a download), connection reuse and message framing (keep-alive, chunked transfer, pipelining), and HTTP/1.1 vs HTTP/2 vs HTTP/3 differences such as multiplexing, flow control and head-of-line blocking. Includes TLS at the request level (handshake overview, session resumption, termination at the edge vs passthrough) and how proxies and load balancers change requests, including forwarded client addresses. Excludes TCP/UDP and OSI-layer networking, attack-focused web security, resource and endpoint design, and CDN or edge-cache operations.

EasyTechnical
79 practiced

Explain the main HTTP methods (GET, POST, PUT, PATCH, DELETE): which are safe, which are idempotent, which responses are cacheable, and when a client should choose POST versus PUT. How do those properties decide what a client may automatically retry after a dropped connection or timeout?

HardTechnical
83 practiced

Compare HTTP/1.1, HTTP/2 and HTTP/3 for a client on an unreliable, battery-constrained network. Cover multiplexing, header compression, connection reuse and keep-alive, CPU and battery cost, middlebox compatibility, and how QUIC changes the picture. Give a case where HTTP/2 helps and one where it causes problems.

EasyTechnical
77 practiced

A client app should show recently fetched data when the device is offline and avoid re-downloading unchanged data on a poor connection. Explain how Cache-Control, ETag and Last-Modified let it do that, how a conditional request and its 'not modified' reply work, and how you would apply this with a client-side HTTP cache or an intermediary cache.

MediumTechnical
70 practiced

Your API currently returns JSON and you want to offer a more compact binary format to some clients without breaking existing ones. How does the client and server agree on the format, and what does that agreement do to HTTP caches and intermediaries in front of the API?

MediumTechnical
62 practiced

A browser app on one origin calls your API on another and the request fails in the browser although the same call works from curl. Explain why the browser behaves this way, what exchange happens before the real request when it is not a simple one, and how you would configure the API for a public API that serves browsers versus a strictly internal one.

Unlock Full Question Bank

Get access to all 7 HTTP Protocol and Web Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.