I have a "Download file" href defined in a javascript file as:
$("#downloadTag").html("<a href=data:text/csv;charset=utf-8," + encodeURIComponent(data) + ">Download</a>");
In chrome, it works as expected, that is, when I click on this download link, it gives the file name as "download.csv". However, in firefox, this puts some kind of gibberish name like "puzdb.part".
Can someone tell me what I am doing wrong?
thanks
Edit: Here is the jsfiddle daemon: http://jsfiddle.net/kLJz9/
Edit No. 2: I noticed that in windows it does not add the .csv extension for chrome, and the behavior for firefox is still the same (for example, the .part extension)
source share