I was wondering if it is possible to make browser behaving the same way as it does when sees "Content-disposition: attachment; filename=..." by using client-side javascript only? This implies the data for the file to be saved is available on the client side only.
I.e. suppose we have a javascript Array, on client side only,
var data = [
["aa","bb","cc","dd","ee","ff","gg","hh","ii"]
[ 1, 2, 3, 4, 5, 6, 7, 8, 9],
..
];
and I want to save this array as a text file to the users's computer. The user must be prompted for the file name(i.e. I'm NOT trying to bypass browser's security settings or anything like that).
Is this doable without storing array to the server's temp file and making another request to get this temp file back to the user? If there is no simple answer to this question - any ideas, google keywords or links are much appreciated.