Re: Still trying to make sense of HTTP caching model

Jeffrey Mogul writes:
 > 
 > P.S.: By the way, a Max-age: header suffers from at least a potential
 > problem; since it takes non-zero time to retrieve an object,
 > short Max-age: values might not be accurate.  For example,
 > if I assign a Max-age: value of 6 hours to a 10 Mbyte object, which is
 > then retrieved by a client at the wrong end of a 2400 baud modem,
 > a naive implementation is going to do quite the wrong thing.  If
 > we do use Max-age, the spec needs to require that the received
 > value be decreased by the total retrieval time.  (If proxies are
 > involved, each transfer must decrease the Max-age value.)

John Franks then wrote:
  I think that small T with slow connections is a non-problem.  The
  proxy should use the time the header arrives as the base time from which to
  measure T.  Of course, the proxy has to re-calculate T, when it sends
  the document.  But at least it doesn't have to parse (multiple?) date
  formats.

I think this situation is, or can easily be made, equivalent to the
situation with Expires, and no harder to deal with, by using a similar
"deskewing" algorithm to the one Jeff already proposed:

	    Tc = client's clock
	    Ts = server-current-time
	    Tr = round-trip-time measured for this request
	    Te = Expires-time
	then
	    actual-expiration-time = Tc + (Te - Ts) - Tr/2


Tc is measured as soon as you get the first response bytes,
and Ts is the exact (parsed) contents of the date header.
Tr is the time between sending the last bytes of the request and
receiving the first bytes of the response.  

*** This measurement of Tc and Tr is how you would also have to do it
to avoid the same long-transfer-time problem with Expires. ***

Then the document expires at local time

	Te = Tc - Tr/2 + nnn

where nnn is the number of seconds given in max-age=nnn.
Note that Ts is not used in this case.

(Proxies would perform this deskewing to compute their own internal
expiration times, but they don't have to modify any time info they
pass along).

This is neither better or worse than the situation with Expires.

Received on Friday, 8 September 1995 12:39:12 UTC