From 098d6ec5c32a3cba92c12727018422460d22abac Mon Sep 17 00:00:00 2001 From: Seirdy Date: Sun, 23 Jun 2024 16:15:08 -0400 Subject: [PATCH] New note: on valid XHTML5 again --- content/notes/on-valid-xhtml5-again.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 content/notes/on-valid-xhtml5-again.md diff --git a/content/notes/on-valid-xhtml5-again.md b/content/notes/on-valid-xhtml5-again.md new file mode 100644 index 0000000..74255ac --- /dev/null +++ b/content/notes/on-valid-xhtml5-again.md @@ -0,0 +1,16 @@ +--- +title: "On valid XHTML5 again" +date: 2024-06-23T16:15:06-04:00 +replyURI: "https://snug.moe/notes/9uv9x9r9tqq1pcxu" +replyTitle: "what if I put in a bunch of effort to make my website valid XHTML5" +replyType: "SocialMediaPosting" +replyAuthor: "LunarEclipse" +replyAuthorURI: "https://lunareclipse.zone/" +#syndicatedCopies: +# - title: 'The Fediverse' +# url: '' +--- + +Switching a site to XHTML5 is only a lot of work at first, because it may have latent bugs. For instance, you may have a stray tag that the HTML parser auto-closes but an XHTML parser won't. I find this effort worthwhile because [some of these bugs will eventually visibly manifest]({{}}). + +One thing I've noticed is that some tools are incompatible with an XHTML5 MIME type. Site auditors like Lighthouse are only provisionally compatible, and some browser extensions are rather buggy. You can compare them yourself on seirdy.one: switch the MIME type by appending `/index.xhtml` to a URL. You may have to disable the CSP sandbox by [appending `?sandbox=off` to the URL]({{}}) to get Lighthouse to work. I keep my site polygot and serve with the `text/html` MIME type by default for maximum compatibility.