If for example you follow the link:
data:application/octet-stream;base64,SGVsbG8=
The browser will prompt you to download a file consisting of t
Chrome makes this very simple these days:
function saveContent(fileContents, fileName) { var link = document.createElement('a'); link.download = fileName; link.href = 'data:,' + fileContents; link.click(); }