Skip to content
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

Set-Cookie attributes are now headers #10730

Closed
wants to merge 1 commit into from
Closed

Conversation

halvardssm
Copy link
Contributor

Summary

For easier linking to each attribute, the Set-Cookie attributes are now headers.

Motivation

As I was writing some documentation for a personal project, I wanted to link to individual attributes for the Set-Cookie header. Unfortunately, as the attributes were a list, I was not able to do so, which is what motivated this change.

If this PR gets merged, it is the intention that I should be able to access each attribute with a direct link, e.g. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attribute

Supporting details

Related issues

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

For easier linking to each attribute, the Set-Cookie attributes are now headers.
@halvardssm halvardssm requested a review from a team as a code owner November 23, 2021 21:29
@halvardssm halvardssm requested review from teoli2003 and removed request for a team November 23, 2021 21:29
@github-actions github-actions bot added the Content:HTTP HTTP docs label Nov 23, 2021
@github-actions
Copy link
Contributor

Preview URLs

Flaws

None! 🎉

External URLs

URL: /en-US/docs/Web/HTTP/Headers/Set-Cookie
Title: Set-Cookie
on GitHub

No new external URLs

@hamishwillee
Copy link
Collaborator

@halvardssm The format of the thousands of reference docs on MDN follows a standard template - attributes are done as a definition list.

@wbamberg "Generally" it is really convenient to be able to link to "whatever". I don't think there is any way we can accommodate this though?

@wbamberg
Copy link
Collaborator

@halvardssm The format of the thousands of reference docs on MDN follows a standard template - attributes are done as a definition list.

@wbamberg "Generally" it is really convenient to be able to link to "whatever". I don't think there is any way we can accommodate this though?

Not in general. For HTML element attributes we have the htmlattrdef macro, that adds anchors: https://github.com/mdn/content/blob/main/files/en-us/web/html/element/iframe/index.md?plain=1#L104, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-csp).

It has occurred to me before (when looking at the values for CSS properties) that we might be able to auto-generate IDs for <dt> elements in the markdown-to-HTML step, just like we do for headings. But I've not given it any real thought so I don't know if there would be any big issues with doing that.

@halvardssm
Copy link
Contributor Author

@hamishwillee i see, thank you for letting me know.

It would be convenient to be able to link to whatever, so I am fully supporting the auto generation of ids (links).

As this PR will not get through either way, should I close it?

@wbamberg
Copy link
Collaborator

I've created mdn/yari#4990 to capture the suggestion to generate id attributes from <dt> elements, and yes, we should close this.

@wbamberg wbamberg closed this Nov 24, 2021
@halvardssm halvardssm deleted the patch-1 branch November 24, 2021 09:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:HTTP HTTP docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants