This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17464 - Don't throw error for <meta http-equiv="X-UA-Compatible"
Summary: Don't throw error for <meta http-equiv="X-UA-Compatible"
Status: RESOLVED NEEDSINFO
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard: waiting on feedback from Henri
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 20:53 UTC by Paul Irish
Modified: 2013-06-26 12:59 UTC (History)
4 users (show)

See Also:


Attachments

Description Paul Irish 2012-06-11 20:53:45 UTC
http://validator.nu/?doc=http%3A%2F%2Fhtml5boilerplate.com

X-UA-Compatible is a very common meta and quite necessary for browsers such as IE to use the latest rendering engine. 

Use of this meta causes an *error* in the validator. This should be a warning at the maximum and potentially just an "Info" note.


Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#other-pragma-directives

Though.. if I'm reading this right... is this solution to this issue just adding an entry to http://wiki.whatwg.org/wiki/PragmaExtensions  ?
Comment 1 Mathias Bynens 2012-06-12 09:02:29 UTC
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#concept-http-equiv-extensions says:

> 4.2.5.4 Other pragma directives

> Extensions to the predefined set of pragma directives may, under certain 
> conditions, be registered in the WHATWG Wiki PragmaExtensions page. 
> [WHATWGWIKI]

> Such extensions must use a name that is identical to an HTTP header registered
> in the Permanent Message Header Field Registry, and must have behavior 
> identical to that described for the HTTP header. [IANAPERMHEADERS]

> Pragma directives corresponding to headers describing metadata, or not
> requiring specific user agent processing, must not be registered; instead, use
> metadata names. Pragma directives corresponding to headers that affect the HTTP
> processing model (e.g. caching) must not be registered, as they would result in
> HTTP-level behavior being different for user agents that implement HTML than
> for user agents that do not.

`X-UA-Compatible` is not listed on <http://www.iana.org/assignments/message-headers/perm-headers.html>.
Does that mean it can’t be registered?
Comment 2 Anne 2012-06-12 09:17:38 UTC
If it works as an HTTP header (does it?) you could register it. But that is a long and somewhat painful process. In addition the IETF might not accept X- prefixed headers for purity reasons...

Alternatively you could attempt to change the registration rules for pragma directives.

(It does seem to me that X-UA-Compatible is a hack and not really in the spirit of following standards.)
Comment 3 Mathias Bynens 2012-06-12 09:18:40 UTC
(In reply to comment #2)
> If it works as an HTTP header (does it?) you could register it.

It does work as an HTTP header, yes.
Comment 4 Michael[tm] Smith 2013-06-26 12:55:08 UTC
CCing Henri

X-UA-Compatible is listed at http://wiki.whatwg.org/wiki/PragmaExtensions but it's still not registered with IANA as far as I know. Regardless, I'm personally inclined to just give up and have the validator allow it but I think Henri may still feel differently.
Comment 5 Michael[tm] Smith 2013-06-26 12:59:55 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > If it works as an HTTP header (does it?) you could register it.
> 
> It does work as an HTTP header, yes.

To be clear, it works as an HTTP header only in IE. So it's an browser-specific pragma for IE that's not useful to any other UAs. Which is the rationale for why we have the validator complain about it, if it sees that header. And also why even if we make the meta@http-equiv value valid, we still might want to emit a warning for it.