Skip to content

Commit 18308ca

Browse files
lanthalerweaverryan
authored andcommitted
Corrected the wrong information that the Expires header is vulnerable to clock skew. This is not true as the lifetime calculation relies on the Date header. See http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-12#section-2.3.1
1 parent aee69f5 commit 18308ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

book/http_cache.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,10 @@ The resulting HTTP header will look like this::
464464
The ``setExpires()`` method automatically converts the date to the GMT
465465
timezone as required by the specification.
466466

467-
The ``Expires`` header suffers from two limitations. First, the clocks on the
468-
Web server and the cache (e.g. the browser) must be synchronized. Then, the
469-
specification states that "HTTP/1.1 servers should not send ``Expires`` dates
467+
Note that the ``Expires`` header is not vulnerable to clock skew, since the
468+
lifetime is calculated using the ``Date`` header which comes from the
469+
origin server as well instead of using the local clock.
470+
The specification states that "HTTP/1.1 servers should not send ``Expires`` dates
470471
more than one year in the future."
471472

472473
.. index::

0 commit comments

Comments
 (0)