an old MIME type Application/x-csv

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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值