file:/// to http:// communication via IFrame

帅比萌擦擦* 提交于 2019-12-05 13:43:18

You may find some of these techniques useful: http://softwareas.com/cross-domain-communication-with-iframes

Edit: Per comments below, these techniques don't seem to work when accessing file:///c:\<path>\test.html, whereas they do when accessing http://localhost/test.html.

I think that's because the file protocol is even more restricted by the browser than the http protocol. The MSDN page on the file protocol states:

Internet Explorer 6 Service Pack 1 (SP1) no longer allows browsing a local machine from the Internet zone. For instance, if an Internet site contains a link to a local file, Internet Explorer 6 SP1 displays a blank page when a user clicks on the link. Previous versions of Windows Internet Explorer followed the link to the local file.

Whatever technique you were using to get some cross-domain communication was probably blocked by the browser because you were using the file protocol.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!