强制Internet Explorer以保存提示对话框 [英] Force internet explorer to save prompt dialog

查看:97
本文介绍了强制Internet Explorer以保存提示对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想强制Internet Explorer始终要求保存文件提示,同时下载pdf以及安装了一些阅读器。

有人知道注册表设置适用于此目的吗?还是其他任何解决方案?

谢谢



我尝试过的方法:



i需要在webbrowser上工作,我试图在导航事件中添加Content-Type:application / pdf; Content-Disposition:attachment; filename = \prova.pdf \ div class =h2_lin>解决方案

使用内容类型application / octet-stream而不是application / pdf发送文件。这样浏览器将始终将其视为基本二进制文件,它将提供的唯一选项是打开或保存。



另外作为基本规则强制IE ......对于任何问题都不是解决方案。您的网站永远不会覆盖浏览器功能,如果他们不使用IE浏览器而是其他浏览器会怎么样?通常有办法解决这些问题,但试图限制浏览器的功能绝不是其中之一。


I want to Force internet Explorer Always to ask save file prompt, also downloading pdf and also with some reader installed.
Someone knows what registry settings works for this purpose? Or any other solution?
Thanks

What I have tried:

i need this working on webbrowser, i tried to add "Content-Type: application/pdf; Content-Disposition: attachment; filename=\"prova.pdf\"" in the navigating event

解决方案

Send your file with the content type "application/octet-stream" rather than "application/pdf". That way the browser will always treat it as a basic binary file and the only options it will give are to open or save.

Also as a basic rule "forcing IE to...." is never a solution for any problem. Your website can never override browser functionality, and what if they are not using IE but some other browser? There are usually ways to tackle these issues but trying to restrict the browser in its functionality is never one of them.


这篇关于强制Internet Explorer以保存提示对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆