46

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

Thanks!

2 Answers 2

34

Citing MDN on this:

Length limitations

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.

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

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.

6

Not all browsers support the data URI scheme. IE7 and earlier doesn't support data uri's at all. IE8 has a 32k limit.

http://www.bennadel.com/blog/2002-Creating-Base64-Encoded-Data-URLs-For-Images-In-ColdFusion.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.