3 ms·
Yep! 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 XHT
by capitainenemo 3y ago
Yep! 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!