-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie expiration #10
Comments
It's probably a good idea to improve our documentation of how to clear cookies, I agree. cc @annevk @sbingler I should also mention @yoavweiss's efforts to introduce a new However, due to the backwards-facing nature of these kinds of features improved documentation probably still makes sense. |
Frankly, even without @yoavweiss's explicit |
That seems like a good idea to me.
The Max-Age section warns that not all user agents support it, but that's almost certainly out of date and should be updated after confirmation. |
I'm more than willing to fork and add the separate section on cookie deletion and create a PR, but it's your document - I don't want to tread on your toes. |
Please feel free to submit PRs to this document! Note that it's not officially adopted by the HTTPWG yet. |
Do we have tests for |
|
@sbingler clearly Mind you, last time I checked was probably with IE6, so... |
Your new spec and the original RFC 6265 both specify that the correct way for a server to delete a cookie on the client is to send a
Set-Cookie
response header with the cookie name and anExpires
value in the past. From your document (Section 4.1.2 - Semantics - Non-Normative)):"[...] Notice that servers can delete cookies by sending the user agent a new cookie with an Expires attribute with a value in the past."
This mechanism is also spelled out in Section 3.1 - Examples.
Can I suggest that the cookie deletion/removal (not sure of which term is preferred) mechanism is 'officially' specified in a 4.1.* section, rather than being relegated to a line within a paragraph in a 'non-normative' section?
Also there are plenty of instances where developers attempt to delete/remove a cookie by sending a
Set-Cookie
header with a date in the past, but the date is incorrectly formatted, resulting in the cookie not being deleted. While this is normally fixed quickly, since it's pretty easy for a developer to tell whether the cookie has been deleted on the user-agent, perhaps a 'standard' date could be suggested and documented in this section, e.g. some wording along the lines of the following:The text was updated successfully, but these errors were encountered: