Skip to content
Closed
Next Next commit
Improve specification explanation
RFC 2616 and RFC 7234 define that a recipient MUST ignore Expires header if one of `s-max-age` or `max-age` header is defined.
  • Loading branch information
matthieu88160 authored Mar 8, 2017
commit 2afc79feea16316c6fc8e88402427b1fdf26e06c
6 changes: 6 additions & 0 deletions http_cache/expiration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,11 @@ the lifetime calculation vulnerable to clock skew. Another limitation
of the ``Expires`` header is that the specification states that "HTTP/1.1
servers should not send ``Expires`` dates more than one year in the future."

.. note::

Accordingly with `RFC 7234 - Caching`_, the `Expires` header value will be ignored by any recipient if a `s-max-age` or `max-age` header is defined.


.. _`expiration model`: http://tools.ietf.org/html/rfc2616#section-13.2
.. _`FrameworkExtraBundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/cache.html
.. _`RFC 7234 - Caching`: https://tools.ietf.org/html/rfc7234
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this a deep link to https://tools.ietf.org/html/rfc7234#section-5.3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no, maybe that's not the best idea as https://tools.ietf.org/html/rfc7234#section-4.2.1 also contains information about the process that must be applied.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, the process is well explained in section 4.2.1