News for hackers. Stuff that matters.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by derefr on Wednesday May 19, 2021 @10:47PM (#27216810)
Given that email is MIME (i.e. you can add multiple “bodies” to a message, with different content-types, and the email client will select the best one it can render), you’d think we could just come up with a new content-type for email meaning “HTML, but for real”, and add that to email in addition to the current “HTML, but sucky” semantics we get from text/html-typed bodies.

For a while, people would be sending both text/html and text/html-for-real, but eventually we’d maybe be able to switch to only sending text/html-for-real (while also continuing to send text/plain for fallback.)

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by smichel17 on Thursday May 20, 2021 @08:02AM (#27220038)
I wish people sent text/plain as a fallback for text/html...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by blacksmith_tb on Wednesday May 19, 2021 @11:55PM (#27217204)
CSS grid email designs would be great, but we'd also get an avalanche of nightmare canvas-tag spam...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by akx on Thursday May 20, 2021 @05:07AM (#27218999)
A canvas tag won't do much without scripts, and I really don't believe any client would allow running scripts from email...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by toastal on Thursday May 20, 2021 @12:55AM (#27217525)
Maybe more people will then demand plaintext as we come full circle
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by ratww on Thursday May 20, 2021 @03:22AM (#27218353)
You can have one without another! Apple Mail supports grid, but doesn’t support canvas or script tags.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by drewzero1 on Thursday May 20, 2021 @01:17PM (#27224009)
> a new content-type for email meaning “HTML, but for real”

text/email Mozilla/5.0 (KHTML, like Gecko)

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by derefr on Thursday May 20, 2021 @02:57PM (#27225525)
I get what you mean, but it's not like we'd have to keep adding these on. "text/html" on email clients currently means "some specific ossified version of HTML4"; but text/html-for-real would hopefully mean "the newest and most featureful version of HTML that your rendering engine can manage." So there'd just be the one version of it.

Eventually, if everybody switched to sending text/html-for-real first, maybe the email clients could follow along and make text/html also mean "the newest and most featureful version of HTML5"; and then we could all revert to just calling it text/html.

Rather than a distinct MIME type, I believe it could also make sense to borrow the HTTP header X-Content-Type-Options: nosniff (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-...) into the MIME envelope of the text/html document, to signal that this envelope is "really" using HTML, no second-guessing. (This is how the header was used in IE8: to tell the renderer to explicitly not trigger IE historical-renderer compat mode.)

That might get into a situation where the message has two MIME bodies that are both text/html, though, and I'm not sure existing clients have been written to cope with that. A well-engineered solution would work with existing clients (by having them ignore the body of unknown-to-them media-type, and render the old fallback body of known media-type.)