The right HTTP header content-type for CSV files is the following:


The complete HTTP header:

Content-Type: text/csv

In PHP you should use for an CSV file download the following lines at the start of the file:

header("Content-Type: text/csv");
// after this line you output the content of the csv file

In C#/ASP .Net you use the following code in the code behind file:

this.Response.ContentType = "text/csv";