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

meta tag with attribute http-equiv has a small arbitrary limit on the headers that can be specified #7435

Open
jacobpersico opened this issue Dec 21, 2021 · 4 comments
Labels
clarification Standard could be clearer

Comments

@jacobpersico
Copy link

meta http-equiv is just used to specify a header, so you should be able to specify any header you need to without getting a validation error in the w3 validator and having the page being considered invalid HTML code.

I do not see the need to limit the headers that are allowed to just three.

I propose allowing any value for attribute "http-equiv" and any value for attribute "content" when http-equiv is used, this way any header can be used without a validation error and having the code be considered invalid.

If it is a valid header you should be allowed to specify it using the meta tag. Why not?

There are many times where webmasters need to use the meta tag to specify headers other then the three allowed in the current HTML5 standard.

Thanks,
Jacob Persico

@annevk
Copy link
Member

annevk commented Dec 21, 2021

Unfortunately, it doesn't actually set a HTTP header. That was the envisioned functionality, but it doesn't work like that in practice. That's why there are limitations.

Not sure what you mean with "just three" by the way, there's seven pragma directives defined by the standard and five of them are currently conforming.

@jacobpersico
Copy link
Author

I only see three here that are conforming: https://dev.w3.org/html5/spec-LC/semantics.html#pragma-directives

I could be mistaken, maybe that section does not list all of them.

But there I only see content-type, default-style, and refresh

@jacobpersico
Copy link
Author

OK I just looked and I found this listing which shows all the conforming pragma: https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives

@domenic
Copy link
Member

domenic commented Dec 21, 2021

I guess we should add some clarification documentation to the spec at https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives saying something like

Despite the name "http-equiv", this attribute has nothing to do with HTTP headers, apart from some historical coincidences.

That won't help people who are looking at the wrong document, but it still seems like a good idea.

@domenic domenic added the clarification Standard could be clearer label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

4 participants
@domenic @annevk @jacobpersico and others