I have decided to hardcode this table:
Here's the script I use to test the maxsize:
String.prototype.repeat = function( num )
{
return new Array( num + 1 ).join( this );
}
testDataURI=function(size)
{
window.open("data:text/plain,"+"a".repeat(size-16))
}
testDataURI(100000) //test 100k characters
JSFIDDLE
Results:
- Chrome (as of version 28): works with 2 097 152 Bytes, which is exactly 2 MB
- Firefox (as of version 26): works with 1 040 000 Bytes, which is probably 1 MB