Exercises
Explore the HTTP concepts that power communication between web browsers and servers. This quiz covers safe and idempotent methods, response status codes, conditional requests, cache freshness, content negotiation, cookie security, and CORS preflight requests. The questions combine practical scenarios with visual request-response flows to assess skills useful in both front-end and back-end web development.
Answer the questions below and check the explanation for each answer.
0/10 answered
Auto audio on: the next questions will be read aloud when you click Continue.
GET is safe because it is intended only to retrieve data, and it is idempotent because repeating the same request should have the same intended effect as sending it once.
201 Created indicates that a resource was created successfully. A Location header can provide the URI of that new resource.
304 Not Modified tells the browser that its cached representation remains valid. The browser can reuse that copy instead of downloading the body again.
PUT is idempotent because repeating an identical request should leave the resource in the same intended state. The response details may differ, but the intended server-side effect does not multiply.
403 Forbidden means the server understands the request but refuses to authorize it. A 401 response generally indicates that valid authentication credentials are required.
A max-age of 300 allows the response to remain fresh for 300 seconds. At 10:02:00, only 120 seconds have elapsed, so the cached response is still fresh.
The Accept header lists media types the client can process. Content-Type describes the media type of the body being sent in the current message.
The HttpOnly attribute prevents client-side JavaScript from accessing the cookie through APIs such as document.cookie. The browser can still attach it to eligible HTTP requests.
The browser uses an OPTIONS request for CORS preflight. It asks the target server whether the intended method and headers are permitted before sending the actual request.
A weak ETag supports semantic equivalence rather than byte-for-byte identity. It can be useful for cache validation, but it is unsuitable for operations that require strong comparison, such as some range requests.
Video Courses
recommended
Ideal for beginners
Ideal for beginners
recommended
Ideal for beginners
Ideal for beginners
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks