开发者

How do you get the File:// protocol to work in IE8?

I am running a website on my local machine ("http://localhost/asdf") and trying to get some file:// protocol links to work. In reality I'm trying to open a folder, not a specific file, but I can't get eithe开发者_开发知识库r to work.

I've put localhost in my "trusted zone", I've tried every combo of "file" ,":", some number of "/" and then a whole bunch of different paths, but encoded and not encoded.

Nothing I do causes anything to open when I click on the link. If I copy the link destination, and paste that in the browser address window, then it works as expected.

Anyone know the secret?


Add your intranet site in the Intranet Zone in Security Tab.


Generally file:/// URLs shouldn't work on pages downloaded via HTTP, that they sometimes work in IE7 and earlier is a security issue.


We found that window.open method using the file protocol in the URL causes the method to fail. Under I.E. the behavior is erratic. In some instances, the object mentioned in the URL is opened but the window object instance is not created. In others, the URL failes to open. In some instances we noted that under Windows 7, the URL opens, under XP it does not. Under Safari,Chrome and Firefox, the URL never opened.


Local server is something different than just file://, that should work in IE as it is. However, if you probably want to check out apache alias and link that folder to your server. Btw, you should not use file protocol anyway, it will not work on production.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜