0

I implemented a table-to-CSV download by changing an a link's href="download.csv" and download="data:application/csv;charset=utf-8,......"

It works in Firefox and Chrome, but not in Safari, for some reason. I've not checked IE yet.

Any idea what I should do to make it work cross browser?

livibetter
  • 17,094
  • 2
  • 37
  • 40
Jeff
  • 103
  • 1
  • 4
  • 1
    Shouldn’t the contents of `href` and `download` be the other way round? – Sebastian Simon Apr 22 '15 at 01:14
  • 1
    possible duplicate of [How to export JavaScript array info to csv (on client side)?](http://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side) – ceejayoz Apr 22 '15 at 01:14
  • 1
    Yep, [doesn’t seem to be supported](http://caniuse.com/#feat=download)… – Sebastian Simon Apr 22 '15 at 01:15
  • For IE, Firefox, Chrome, see answers to: http://stackoverflow.com/questions/17836273/export-javascript-data-to-csv-file-without-server-interaction and/or my library at https://github.com/DrPaulBrewer/html5csv; there is a QUnit test file if someone wants to test this on Safari. – Paul Apr 22 '15 at 02:32

0 Answers0