an old MIME type Application/x-csv

来源:互联网 发布:中国出生人口实时数据 编辑:程序博客网 时间:2024/06/06 12:49

Today,  focus on Selenium Test to make sure download function works well. Firefox keep pop up a ask dialog to when it is trying to download CSV file, even I set downloading CSV file do not require ask dialog. The reason is CSV mime type has a lot of version:

The list below:

'text/x-comma-separated-values'
'text/comma-separated-values'
'application/octet-stream'
'application/vnd.ms-excel'
'application/x-csv'
'text/x-csv'
'text/csv'
'application/csv'
'application/excel'
'application/vnd.msexcel'

=================================================

MIME Application/x-csv

Mime application/x-csv is a non-standard mime type that indicates the presence of a comma separated values (CSV) file.

Comma separated values files are most often used to exchange spreadsheet data amongst different spreadsheet applications. For example, while a Microsoft Works database file may not be easily opened by other spreadsheet programs, if the file is saved in the CSV format, other spreadsheet programs will be able to work with the data. Each “value” in a spreadsheet is separated by a comma which allows other programs to place the values in cells in a new spreadsheet. Officially, .csv files should be marked with the IANA mime type of text/csv.

This is the mime type on record with the Internet Assigned Numbers Authority as of October 2005. However, the CSV format has been in existence for far longer with programmers using their own variations such as text/tab-separated-values and mime application/x-csv. If Web servers, browsers, email clients, and other user agents have been programmed to recognize mime application/x-csv, then they will understand that the download or attached file is a comma separated values file and respond accordingly. If the user agent doesn’t recognize mime application/x-csv, it will likely perform additional scans of the file to determine its nature.

Whether mime application/x-csv or text/csv is used, the file is most likely a CSV file.

=================================================

Using Chorme(Network Tab) to check the MIME type.

0 0
原创粉丝点击