HTTP Quiz
Test your HTTP headers and methods knowledge. — 7 questions
About the HTTP Quiz
Test your HTTP headers and methods knowledge. This quiz has 7 multiple-choice questions. Each question has one correct answer, and you see an explanation straight after you answer, so you learn from every question — including the ones you get wrong. There is no time limit and nothing to sign up for; your answers are not stored.
The questions follow the material in the HTTP Headers Explained guide and the HTTP Status Codes cheatsheet. Read them first if you want to prepare, or take the quiz cold to find the gaps in what you know.
Questions in this quiz
Preview the questions below. Each answer and its explanation are hidden until you choose to reveal them, so you can still take the quiz above without spoilers.
1. Which header carries the authentication token in most API requests?
Show answer
Answer: C. Authorization
Authorization: Bearer <token> is the standard header for JWT and OAuth tokens.
2. What does the Content-Type header specify?
Show answer
Answer: C. The MIME type of the request or response body
Content-Type tells the receiver how to parse the body. Common values: application/json, text/html, multipart/form-data.
3. Which header prevents a page from being embedded in an iframe on other domains?
Show answer
Answer: B. X-Frame-Options
X-Frame-Options: DENY or SAMEORIGIN prevents clickjacking by blocking the page from loading inside an iframe on external sites.
4. What is the difference between Cache-Control: no-cache and no-store?
Show answer
Answer: C. no-store means do not cache at all; no-cache means store but revalidate before use
no-store prevents any caching. no-cache allows storing the response but requires the client to revalidate with the server before using it.
5. Which response header enables CORS for a specific origin?
Show answer
Answer: C. Access-Control-Allow-Origin
Access-Control-Allow-Origin is the CORS response header. A value of * allows all origins; a specific origin like https://example.com restricts access.
6. What does the ETag response header enable?
Show answer
Answer: B. Conditional requests — the client can ask if the resource changed since last fetch
The server sends ETag: "abc". The client then sends If-None-Match: "abc" on the next request. If unchanged, the server returns 304 Not Modified, saving bandwidth.
7. Which header tells the server what media types the client can handle?
Show answer
Answer: B. Accept
Accept: application/json tells the server the client wants JSON. The server responds with Content-Type to confirm what it actually sent.
How to use this quiz
- Answer every question before reading the explanations below — retrieving an answer from memory is what makes it stick.
- Note the questions you missed and revisit the matching section of the guide or cheatsheet.
- Retake the quiz a day or two later. Spaced repetition is one of the most reliable ways to remember technical details.