What's the difference between using applicatio

2020-06-30 11:45发布

What's the difference between using application/csv vs text/csv as the HTTP Accept Header?

2条回答
来,给爷笑一个
2楼-- · 2020-06-30 12:11

A MIME type is used so software ( like a browser for example ) can know how to handle the data.

If a server says "This data is of type text/csv" the client can understand that can render that data internally, while if the server says "This data is of type application/csv" the client knows that it needs to launch the application that is registered on the OS to open csv files.

text/csv is more generic.

查看更多
ゆ 、 Hurt°
3楼-- · 2020-06-30 12:19

text/csv is more appropriate because application as a first part implies some interactivity. Your text file not being interactive, it should be announced as text.

查看更多
登录 后发表回答