Export to CSV is displaying content in browser itself in Safari
I am using the below code to export to csv:-
window.open(
data::application/csv;charset=utf-8,"
+ encodeURIComponent(data),
'_blank'
,
''
);
This is opening file with name and type Unknown.
I have tried to use "text/csv" mimetype and download attribute of hyperlink(anchor tag). But it is also not working.
Is there any way to set Content-Disposition in Jquery.
I read that we cann't use that in client side it is response headers property.
Please let me know if there is a way to resolve this.
Thanks in Advance,
Sushma Katneni