Base64 DataURL 图像的大小限制是多少? [英] What is the size limit of a Base64 DataURL image?

查看:109
本文介绍了Base64 DataURL 图像的大小限制是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道要在浏览器中加载的 Base64 DataURL 图像的最大长度是多少?

I would like to know what is the maximum length of a Base64 DataURL Image to be load in a browser?

谢谢!

推荐答案

引用 MDN对此:

长度限制

虽然 Mozilla 支持基本上无限长度的数据 URI,但浏览器不需要支持任何特定的最大数据长度.例如,Opera 11 浏览器将数据 URI 限制在 65000 个字符左右.

Although Mozilla supports data URIs of essentially unlimited length, browsers are not required to support any particular maximum length of data. For example, the Opera 11 browser limits data URIs to around 65000 characters.

还有 caniuse.com,您还可以在其中查找跨浏览器的支持:

And caniuse.com, where you can also look up the support across browsers:

Internet Explorer 8 中的支持仅限于图像和链接资源,如 CSS 文件,而不是 HTML 文件.IE8 中的最大 URI 长度为 32KB.在 IE9 中也支持 JavaScript 文件,并且最大大小限制设置为 4GB.

Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files. Max URI length in IE8 is 32KB. In IE9 JavaScript files are supported too and the maximum size limit set to 4GB.

这篇关于Base64 DataURL 图像的大小限制是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆