I want to export data as a Data URI, only if the size of the data doesn't exceed the max size of the Data URI supported by the current browser is bigger than the file I want to download.
document.location.href= "data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,"+data
This sometimes results in a Browser error when the file is too big, but I wish that the error could be catched before the download (to try an other method for example).
How can I get the max Data-URI size in JS ?