主要电子邮件客户端软件中的数据 URI 支持是什么样的?
数据 URI 是在 HTML 中嵌入图像和其他二进制数据的标准方法,并且浏览器支持良好记录在网络上。 (IE8 是第一个支持 Data URI 的 IE 版本,每个 URI 的最大大小为 32 KB;其他主要浏览器支持的时间更长。)
我的问题是关于桌面电子邮件和网络邮件客户端软件。
构建 HTML 电子邮件时,标准做法是包含图像作为附件或从外部加载它们(即跟踪图像)。这两者都有缺点(一些客户端列出了所有这些附加文件,而许多客户端正确地阻止或要求用户操作才能查看外部图像)。因此,数据 URI 看起来是一个不错的选择,但前提是电子邮件阅读器支持它。
那么,有人有最近支持此功能的研究的链接吗?或者对此进行过调查吗?例如,以下是CSS 支持概述。我感兴趣的客户端软件包括:
桌面(包括版本信息):Outlook、Apple Mail、Thunderbird、Evolution、Lotus Notes、AOL、Eudora
Webmail: Gmail、Live /Hotmail、雅虎!邮件、AOL
移动设备: Android、iPhone
Data URIs are a standard way to embed images and other binary data in HTML, and browser support is well documented on the web. (IE8 was the first version of IE to support Data URI, with a max 32 KB size per URI; other major browsers have supported it even longer.)
My question is about desktop email and webmail client software.
When building HTML email, standard practice is either to include images as attachments or load them externally (i.e. tracking images). Both of these have disadvantages (some clients list all of these attached files, while many rightly block or require user action to see external images). So, Data URI looks like a good way to go, but only if it's supported by email readers.
So, does anyone have a link to a recent study of support for this feature? Or investigated this at all? For example, here's an overview of CSS support. Client software I'd be interested includes:
Desktop (including version info): Outlook, Apple Mail, Thunderbird, Evolution, Lotus Notes, AOL, Eudora
Webmail: Gmail, Live/Hotmail, Yahoo! Mail, AOL
Mobile: Android, iPhone
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在 Litmus 上做了一个更新的测试,使用内联
元素和 CSS 背景图像。
这些桌面客户端确实显示数据 URI:
这些移动客户端确实显示数据 URI:
所有网络邮件客户端均未显示数据 URI。
这些桌面客户端不支持:
这些移动客户端不支持:
I've done a more recent test at Litmus, with data URIs for inline
<img>
elements and css background images.These desktop clients do show data URIs:
These mobile clients do show data URIs:
None of the webmail clients showed data URIs.
These desktop clients don't:
These mobile clients don't:
我刚刚测试了 GMail,看来 GMail 不再支持数据 URI。
此外,gmx.de(一个非常流行的德国网络邮件提供商)将图像 URI 转换为其服务器上的 URI,而这似乎不支持数据 URI。
I just tested GMail, and it appears that GMail no longer supports data URIs.
In addition, gmx.de (a very popular German web mail provider) converts image URIs to a URI on its server, and this doesn't seem to support data URIs.
Mac Mail、Outlook 2003 和 MobileMe 支持数据 URI。不确定其他客户端的情况,但您可以轻松找到答案 - 在 Gmail 中创建一条新邮件,单击“插入图像”,然后单击“使用 URL”并粘贴数据 URI。然后,将其发送到多个地址并在您想要的客户端中打开它。
Mac Mail, Outlook 2003 and MobileMe support data URIs. Not sure about the other clients, but you can easily find out — create a new message in Gmail, click 'insert image', then click 'use a URL' and paste in the data URI. Then, send it to a number of addresses and open it in the clients you want.
我无法直接回答有关 data-uri 支持的问题,但在电子邮件浏览器中对此类内容的支持通常非常糟糕。这个问题实际上是由于他们中的许多人使用自己的精简渲染引擎而不是完整的 html 渲染器。在仍然最好使用基于表格的设计来确保电子邮件可读的系统中,我不会尝试做任何聪明的事情。
但是,您可能已经知道电子邮件允许两种类型的附件。如果您将附件标记为内联,那么它往往不会显示在附件列表中(尽管经常出现)。
我个人认为,确保电子邮件的可读性比不显示电子邮件要好,显然远程图像的其他方法在这里没有帮助。
I can't answer the question about the support for data-uri directly but support for anything like this is often very bad in email browsers. The issue really spans from many of them using their own cut down rendering engines that aren't full html renderers. In a system that it's still preferable to use a table based design to make sure emails are readable I wouldn't try to do anything clever.
However, you may already know that email allows two types of attachment. If you mark an attachment as inline then it tends not to show up in the list of attachments (though it often does).
I would think personally that ensuring the readability of the email is better than it not showing up and obviously the other approach of remote images doesn't help here.