4 ms·
Good news: XHTML was never abandoned. It still exists today as an optional serialization format for HTML5. I am using it in practice on my website and described
by nayuki 3y ago
Good news: XHTML was never abandoned. It still exists today as an optional serialization format for HTML5. I am using it in practice on my website and described it in great detail: https://www.nayuki.io/page/practical-guide-to-xhtml https://www.nayuki.io/page/practical-guide-to-xhtml
- capitainenemo 3y agoYep! Nice guide. And there's https://www.w3.org/TR/html-polyglot/ https://www.w3.org/TR/html-polyglot/ for polyglots. The main thing you lose (no idea why XHTML5 doesn't add support for this) is <noscript> is ignored. Obviously if you did any other form of JS detection in a session, you can just use that to offer alternate content.
- GoblinSlayer 3y agonoscript is usually abused to death for tracking pixels, "this site requires javascript" warnings and what not.
- nayuki 3y agoEh, even without <noscript>, you could achieve those things by declaring them in the HTML code and then writing a script on the page that hides them immediately. As for the grandparent comment, I checked and <noscript> works fine in XHTML in Firefox. I used this as an example: https://www.nayuki.io/page/caesar-cipher-javascript https://www.nayuki.io/page/caesar-cipher-javascript
- capitainenemo 3y agoInteresting. It isn't officially supported. Browsers do seem to honour it though without parsing errors, even as a tag in the header (say for a redirect fallback instead of JS in a handler). Tested Firefox and Chromium - good to know, had had issues there in the past. Thanks!