记一下,怕忘了。
【问题描述】
本来就是一段PHP控制下载文件的问题。但是在某些操作系统和ie6下面,总是出弹出
“internet explorer cannot download”
【分析与解决】
之前改header改好过一次,但是这次怎么折腾这些报头,ie都不弹出那个[open/save]的对话框了。最后终于找到了问题的根源:
http://support.microsoft.com/kb/812935
"Internet Explorer Cannot Download" Error Message When You Use an HTTPS URL to Open an Office Document or PDF File
在微软的kb文档里面,描述了导致这个问题的原因和解决方法:
To work around this problem, make sure that Do Not Save Encrypted Files
check box is not checked and that the server does not send the
"Cache-Control: No Store" or the "Cache-Control: No Cache" header.
You may also be able to work around this problem by using an HREF to load the document.
Note
This method does not work if the server uses the "Cache-Control: No Cache" header.
对于用户来说:
需要在ie选项->高级中去掉“Do not save encrypted pages to disk”前面的勾。如下图
对于服务器端:
1、不要发送Cache-Control: No Store 或者 Cache-Control: No Cache的header头
2、换用<a href="..."></a>这种标签来下载office或者pdf文档。(我之前是控制某个frame.src来下载文档的。)
【附件】
附上php的下载文件时的header部分代码。
分享到:
相关推荐
windows、 Internet Explorer 系统常见问题
Internet Explorer 5.5正式版安装程序,适合Windows 98、2000的升级
Microsoft Internet Explorer 4.01 (4.71.1712) [Simpl. Chinese].7z
可以浏览Internet Explorer的缓存文件
Internet Explorer已停止工作 win 7 win8
如果此安装过程中出现故障,Internet Explorer 将停止安装过程。 在此情况下,为 Windows 7 安装 Internet Explorer 11 之前,您必须手动安装必备软件。 请确保其他更新的安装已完成 如果任何更新安装过程中或者...
恢复桌面Internet Explorer图标
Internet Explorer 3.01 for Windows3.11 收藏品和网站开发者调试用
Internet Download Manager简称IDM,能提升你的下载速度最多达5倍,安排下载时程,或续传一半的软件。IDM破解版的续传功能可以恢复因为断线、网络问题、计算机当机甚至无预警的停电导致下传到一半的软件。 IDM支持...
Internet Explorer Extpack Mar 13, 2020.exe Internet Explorer Extpack Mar 13, 2020.exe
提供如何進行Internet Explorer 8的卸载。
右边阻止显示Internet Explorer搜索框
Internet Explorer 11.0.9600.16428 For Windows 7
Advanced IE (Internet Explorer) Password Recovery is a program to Recover passwords to web sites saved in Microsoft Internet Explorer (in local password list), as well as AutoComplete strings (form ...
更新 889669 包括安全更新 889293 (MS04-040) 和全部 Internet Explorer 修补程序
Internet Explorer 9.zip
Internet Download Manager的续传功能可以恢复因为断线、网络问题、计算机当机甚至无预警的停电导致下传到一半的软件。此程序具有动态档案分割、多重下载点技术,而且它会重复使用现有的联机,而不需再重新联机登入...
一个列表 罗列Internet Explorer 1.0 到7.0所有小版本号
为Windows 7开发的IE10浏览器如期发布。外观而言,图标毫无变化,延续了IE9;在整体的用户界面上,标签页选项卡变得与Windows 8 IE10相似,显示更加平化与直角化;在性能上,采用了IE10 Chakra Javascript引擎,将变...
此程序紧密地与Internet Explorer和Firefox、Opera结合,自动地处理你的下载需求。此程序还具有下载逻辑最佳化功能、检查病毒,以及多种偏好设定。 注意:先安装原版,再下载语言包idm_chn.zip,将里面的文件解压到...