I've a html page that generate a csv with the following code:
var encodedUri = encodeURI(csvContent);
window.open('data:text/plain,' + encodedUri,'_blank').focus();
I'm using firefox in local and it generates correctly a new tab with the data in it, but with firefox or chrome, not in local, the window opens and then close almost immediately (no popup alert triggers)
how may I avoid this and get my file with no problems?
This is most probably due to AdBlock extension. I disabled it and that solved the issue for me.
Apparently one of the filter lists that uBlock Origin uses comes with a rule that unconditionally blocks any data URI popups. https://github.com/gorhill/uBlock/issues/2465
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With