I am generating an SVG string in JavaScript.
I serve it for the user:
window.open("data:image/svg+xml," + svg_xml_string);
When you try to save this page in Chrome, it will offer to save, since download.svg is in any case, can I change the default file name for downloading?
I tried:
data:image/svg+xml;headers=Content-Disposition%3Aattachment%3Bfilename%3D%22suggest.svg%22,...
But that will not work.
source share