gpt4 book ai didi

ajax - Windows Phone 7 WebBrowser 控件是否实现同源策略?

转载 作者:行者123 更新时间:2023-12-01 18:22:47 25 4
gpt4 key购买 nike

我将一些 HTML 文件放入独立存储中,然后将它们加载到 Windows Phone 7 WebBrowser 控件中。我想用 JavaScript 向远程主机发出 AJAX 请求以获取一些数据。这似乎因“无传输”错误而失败。我认为存在同源政策,导致我的请求无法通过。

有谁知道是否属于这种情况,如果是,是否可以禁用该政策?

最佳答案

这是来自http://msdn.microsoft.com/en-us/library/ff462081(v=VS.92).aspx :

Content loaded from Isolated Storage or dynamically by using the NavigateToString(String) method is treated differently than content loaded from the network. Content loaded from Isolated Storage or dynamically by using NavigateToString has no cross-site restrictions, while content loaded from the network has normal cross-site restrictions. For this reason, you should be careful about loading untrusted content from Isolated Storage or dynamically by using NavigateToString.

因此,您的问题的答案是:是的,但不适用于以您描述的方式加载的文件。

关于ajax - Windows Phone 7 WebBrowser 控件是否实现同源策略?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5109462/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com