开发者

How can I prevent the Internet Explorer Info Bar from appearing when a user downloads a file?

Currently to have to user download a file I have the following javascript.

document.location.href = 'Filesave.ashx?filename=file.zip';

However this results in the 'To help product your security..' info bar开发者_如何学编程 to show up in IE and once the user refreshes the page they are unable to go to their download.

I saw somewhere that you can set the source of a hidden iframe to the file and this would not cause the security issue in IE. I have tried this but am unable to get it working, the info bar still appears.

Any suggestions?


This is not a scriptable object (thankfully). If it were, everyone serving up malware would get rid of it too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜