Acceptance of HTML5 Polyglot served as application/xhtml+xml -
Acceptance of HTML5 Polyglot served as application/xhtml+xml -
in terms of browser back upwards , html5 compliance, (assuming page xml well-formed) how convenient serve html5 polyglot page application/xhtml+xml http content-type header?
in before times served xhtml width text/html header instead, because otherwise browsers not rendered page @ or rendered have oddities in behavior.
does html5 standard requires browsers back upwards application/xhtml+xml content-type? actual state of back upwards across browsers? todays drawbacks of serving application/xhtml+xml?
no, html5 not require browsers back upwards either application/xhtml+xml or text/html.
it simply says
for compatibility existing content , prior specifications, specification describes 2 authoring formats: 1 based on xml (referred xhtml syntax), , 1 using custom format inspired sgml (referred html syntax). implementations must back upwards @ to the lowest degree 1 of these 2 formats, although supporting both encouraged.
since ie9, application/xhtml+xml has been supported on browsers of note.
assuming can author well-formed xml, isn't hard, biggest gotcha not unicode characters valid xml characters, must have additional sanitization of user input might echoed screen clean characters not valid in xml, or web page fail render correctly (or @ all).
also, 3rd party js libraries not polyglot compatible. in particular, rely on document.write() isn't supported xml documents.
xml html5 xhtml content-type polyglot-markup
Comments
Post a Comment