Response.ContentType = “application/vnd.ms-excel” works in IE and firefox but not in Safari

假装没事ソ 提交于 2019-12-08 07:16:57

问题


I have got an asp file with the following header Response.ContentType = "application/vnd.ms-excel" ,it displays the file in an excel format.This works in IE and firefox but not in safari. Any ideas why?


回答1:


Well, you can try forcing it like so:

Content-type: application/force-download

Content-disposition: attachment; filename="somefile.txt"

Please say if it works for you. Hope it helps.



来源:https://stackoverflow.com/questions/4959732/response-contenttype-application-vnd-ms-excel-works-in-ie-and-firefox-but-no

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!