http - 强制浏览器使用 "Save As ..."对话框

标签 http internet-explorer header

我希望在用户单击超链接时出现“另存为...”对话框。

我目前正在发送 HTTP header :

应用程序/八位字节流 内容处置:内联;文件名=something.doc

显然,IE 用户看到页面内联呈现为乱码 ascii。强制在 IE 上弹出“另存为...”对话框的最佳方法是什么?

最佳答案

试试 Content-Disposition: Attachment

关于http - 强制浏览器使用 "Save As ..."对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1662268/

相关文章:

c++ - 如何从 libcurl 中的 http header 中删除 Accept

http - 无法使用 HTTP header 在 AWS S3 中设置对象元数据

c# - 我们可以创建自定义 HTTP 状态代码吗?

internet-explorer - 如何在 Linux 上一次重新加载所有浏览器?

C++预处理器#include

c# - 测量下载速度

javascript - 元素在 IE 8 中始终为空

css - Internet Explorer 7 中不需要的边距问题

button - 如何在 TreeView 标题中靠近 "Create"和 "Import"按钮 Odoo 8 添加按钮?

ios - 标题 View 模型