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

HTTP Header template - add case if no browser compat applies #36298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hamishwillee
Copy link
Collaborator

For many HTTP headers there is no specific browser integration - i.e. the browser itself doesn't do anything to add headers to requests or handle them in responses (you can write your own code to do this using fetch().

For this case there is no browser compatibility. To make it clear that this is intentional we can add some standard text to the browser compatibility section. This proposes said text.

Falls out of discussion in #36197

@hamishwillee hamishwillee requested a review from a team as a code owner October 11, 2024 01:34
@hamishwillee hamishwillee requested review from chrisdavidmills and removed request for a team October 11, 2024 01:34
@github-actions github-actions bot added Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed labels Oct 11, 2024
Copy link
Contributor

@@ -44,6 +44,9 @@ page-type: mdn-writing-guide
> Note that you may first need to create/update an entry for the HTTP header in our <a href="https://github.com/mdn/browser-compat-data">Browser compat data repo</a>, and the entry for the header will need to include specification information.
> See our [guide on how to do this](/en-US/docs/MDN/Writing_guidelines/Page_structures/Compatibility_tables).
>
> Browser compatibility does not apply for HTTP headers where no specific implementation is provided (such as automatically adding a request header to some requests or changing behaviour based on data in a response header).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
> Browser compatibility does not apply for HTTP headers where no specific implementation is provided (such as automatically adding a request header to some requests or changing behaviour based on data in a response header).
> Browser compatibility does not apply for HTTP headers where no specific implementation is provided (such as automatically adding a request header to some requests or changing behavior based on data in a response header).

"Stupid Americanish," I hear you say.

_If the browser has specific handling for the header, remove the text below:_

This header has no specification-defined browser integration ("browser compatibility" does not apply).
Developers can set and get HTTP headers using `fetch()` in order to provide application-specific implementation behavior.
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this is a bit too specific. I know the last PR used this verbiage but IMO HTTP is not confined to JS-server communication. What about non-JS HTTP clients?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants