Contact emails
ari...@chromium.org, mike...@chromium.org
Specification
https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#name-the-expires-attribute
Summary
When cookies are set with an explicit Expires/Max-Age attribute the value will now be capped to no more than 400 days in the future. Previously, there was no limit and cookies could expire multiple millennia in the future.
Blink component
Motivation
The draft of rfc6265bis now contains an upper limit for Cookie Expires/Max-Age attributes. As written:
`The user agent MUST limit the maximum value of the [Max-Age/Expiration] attribute. The limit MUST NOT be greater than 400 days (34560000 seconds) in duration. The RECOMMENDED limit is 400 days in duration, but the user agent MAY adjust the limit to be less. [Max-Age/Expiration] attributes that are greater than the limit MUST be reduced to the limit.`
400 days was chosen as a round number close to 13 months in duration. 13 months was chosen to ensure that sites one visits roughly once a year (e.g., picking health insurance benefits) will continue to work.
According to measurements in Chrome, of all cookies set, about 20% have an Expires/Max-Age further than 400 days in the future. Of that 20%: half target 2 years, a quarter target 10 years or more, and the remainder are spread over the rest of the range.
TAG review
Just an FYI (this is a small change that has already landed in the draft spec and has support from other browsers, but we'll send an FYI issue to the TAG).
Compatibility
Existing cookies will not expire sooner, but any attempts to update/re-set them will limit the new expiration date to 400 days at most.
Safari is already partially compliant (it an upper age limit of 7 days when cookies are set client side but no limit when set by the server), while Firefox and Chrome both support cookies with expiration dates orders of magnitude longer than a millenia in the future.
Gecko: Positive
WebKit: Positive
Web developers: None Yet, but attempting to gather some.
Attempts to set cookies with lifetimes past 400 days will be highlighted in the Issues tab.
Is this feature fully tested by web-platform-tests?
There’s some, but more will be added once testdriver.js supports it.
Tracking bug
Link to entry on the Chrome Platform Status
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGpy5DJdgcDqgJQOq%3DHdvLzMV%2BRupiW7Wqv2swPco%2BQzWtziSQ%40mail.gmail.com.
Deal, but let's call metrics for M103 and the feature in M104.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
LGTM3
I am slightly concerned with cookies used daily unexpectedly
disappearing every 400 days. If there was a way to refresh them
when used, maybe that would make this smoother for web developers,
but that is a followup feature. If the metrics show that it is a
common scenario.
/Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f15ced2a-64c2-42bb-9728-3d60747b6172n%40chromium.org.