March 2014
Intermediate to advanced
538 pages
13h 19m
English
As we’ve seen, there are quite a few moving parts involved with HTTP caching. To illustrate how everything works together, let’s take a look at a common scenario involving two clients, an HTTP cache and the origin server. For the sake of brevity the body and all headers are not shown in the responses.
First, Client A does an initial request, as shown in Figure D-1.

GET request checks whether it has a cached response. It doesn’t, so the cache forwards it on to the origin server.
ETag and max-age headers.
Accept header value.
AGE header to inform the client of the age of the representation.
ETag and Expires information.
Fifteen minutes later, Client B makes a request to the same resource, as shown in Figure D-2.

Accept that the representation ...