Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get around IE8 32k limit on data:uri on base64 encode?

Tags:

I need to send an html response to the browser containing a 1920x1080 png. It's a screenshot taken by an html query.

I encode the image in base64 and sends it embedded as an text/html content-type. Something simple like :

<HTML><HEAD>Whatever</HEAD><BODY><img src="data:image/png;base64,data"/></BODY></HTML>

It works fine on FF and Chrome, the problem is I need to support IE8. IE8 as a limit on the length of the data:uri.

If I compress the image so the png encoding is under 32k (about 600x500) I lose too much information.

What would be the easiest work around for this problem? (I don't have access to a server to host the image or such)

like image 962
Martin Avatar asked Aug 27 '10 17:08

Martin


1 Answers

In the end we dropped IE8 support.

I'm lucky it's for internal debugging purpose only.

The problem still stand though. Hopefully IE9 won't have data:uri limit.

like image 80
Martin Avatar answered Sep 23 '22 00:09

Martin