1

The question is simple: Can Polyglot Markup be "served" with the content-type: text/html+xml; charset=utf-8?

unor
  • 92,415
  • 26
  • 211
  • 360
brunoais
  • 6,258
  • 8
  • 39
  • 59

1 Answers1

3

Any content can be served with any content type. What the receiver makes of it is another matter.

text/html+xml is not a registered MIME type although browsers should treat it as XML according to the HTML5 spec

When a document is transmitted with an XML MIME type, such as application/xhtml+xml, then it is treated as an XML document by Web browsers, to be parsed by an XML processor.

and

The term XML MIME type is used to refer to the MIME types text/xml, application/xml, and any MIME type whose subtype ends with the four characters "+xml". [RFC3023]

The real question is why would you want to do this when there are registered MIME types available for the purpose?

Alohci
  • 78,296
  • 16
  • 112
  • 156
  • 1
    Yes. To further qualify the bit about "What the receiver makes of it is another matter", I did a little test and none of the browsers I've tried would display the file; they all said "unknown filetype" and wanted to save it to disk instead. – Mr Lister Mar 04 '12 at 13:18
  • @MrLister - Right, thanks. Of course, once the content has been passed off to the XML parser, what the browser does with the content and content type is outside the scope of any html spec, and the browser can treat it as it likes. – Alohci Mar 04 '12 at 13:53