setting is the following: I have a homepage where I display a diagram that has been constructed using comma seperated values from within the page. I\'d like to give users th
HTML:
Download
JavaScript:
function onDownload() { document.location = 'data:Application/octet-stream,' + encodeURIComponent(dataToDownload); }
Taken from How to Download Data as a File From JavaScript