2 ms·
The rendering differences in modern browsers are actually way more lenient. By the spec: If it’s served from DISK with that header, it’ll be rendered as XHTML,
by freeone3000 4y ago
The rendering differences in modern browsers are actually way more lenient. By the spec: If it’s served from DISK with that header, it’ll be rendered as XHTML, with the accordant failures. If it’s served from web, and has a Content-Type, this overrides DOCTYPE. (Ex, if you wanted to show it as text…) This will cause the page to be rendered in “quirks mode” in older browsers, or as a standard HTML page in modern browsers. application/xhtml+xml is as different from text/html as text/plain, and they all absolutely change the rendering pipeline — or should.
The difference in rendering lies in invalid XML documents — if you skip a closing tag in XHTML, the page should error and REFUSE TO RENDER. At all. Just display an error message to the end user. If your webpage doesn’t do this when it doesn’t have matching tags, it is not being rendered as XHTML by the spec.