question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redesign CSV export to improve usability

See original GitHub issue

Original title: Set content type for CSV so that browsers will attempt to download instead opening in the browser

Right now, if the user clicks on the CSV related to a table or a query, the response header for the content type is

“content-type: text/plain; charset=utf-8”

Most browsers will try to open a file with this content-type in the browser.

This is not what most people want to do, and lots of folks don’t know that if they want to download the CSV and open it in the a spreadsheet program they next need to save the page through their browser.

It would be great if the response header could be something like

'Content-type: text/csv');
'Content-disposition: attachment;filename=MyVerySpecial.csv');

which would lead browsers to open a download dialog.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
simonwcommented, Dec 11, 2021

Good call! I’m doing a refactor #1518 right now which will hopefully bring the functionality of those two much closer - I’ll make a note to consider this there too.

0reactions
fgreggcommented, Apr 4, 2022

another way to get the behavior of downloading the file is to use the download attribute of the anchor tag

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download

Read more comments on GitHub >

github_iconTop Results From Across the Web

UI redesign to include more columns, saved searches ...
Recently we started the project to revamp the UI and improve the usability of the application. Our sincere thanks to all of you,...
Read more >
Improve UX of "import to csv" modal · Issue #6431 - GitHub
Having it in the modal has improved the usability somewhat since it was sitting loose under gridfields but still room for improvements.
Read more >
Designing User-Friendly Data Tables | UX Booth
At the very least, include an export CSV button with your data tables. If you have to push your table redesign to the...
Read more >
Sharing and exporting results to CSV - UsabilityHub Help Center
How to export test results as a CSV. Similarly, at the top of the test results, select the Export results as CSV button....
Read more >
Design Principles for Data Export - DiVA
The aim of this thesis was to identify the design principles to develop generic data export functionality in data-.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found