3 ms·
I currently serve real XHTML5 code on my website with the correct media type of application/xhtml+xml. https://www.nayuki.io/ https://www.nayuki.io/ This works
by nayuki 7y ago
I currently serve real XHTML5 code on my website with the correct media type of application/xhtml+xml. https://www.nayuki.io/ https://www.nayuki.io/
This works properly in all modern browsers (Chrome, Firefox, Safari, Edge; PC, Mac, Android, iOS) and even Internet Explorer 11. Though in the past, I had to make concessions for older versions of IE, serving the same code as text/html instead.
I arranged things this way because I hand-write much of the HTML code on the site, and want to catch syntax errors as early as possible without the browser silently (and possibly incorrectly) fixing my mistakes. In any case, this is living proof that XHTML5 works.
- the8472 7y agoAt least in firefox this isn't handled as XML DOM document (they might still use the XML parser). XHTML pages used to be. On your page: document instanceof XMLDocument // false On https://upload.wikimedia.org/wikipedia/commons/e/e9/SVG-Grundelemente.svg https://upload.wikimedia.org/wikipedia/commons/e/e9/SVG-Grun... document instanceof XMLDocument // true