什么浏览器允许跨域XMLHtt prequest从本地文件? [英] What Browsers Allow Cross-Origin XMLHttpRequest From Local Files?

查看:346
本文介绍了什么浏览器允许跨域XMLHtt prequest从本地文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Internet Explorer 8中允许跨域XHR从本地文件,但其他浏览器是什么?我想知道什么版本/ OS这将工作(如果有)各主要浏览器5。请包括像Chrome的的任何变通办法 - 禁用 - 网络安全标志

I know Internet Explorer 8 allows cross-domain XHR from LOCAL files, but what about other browsers? I'd like to know about what versions/OS this will work on (if any) for each of the major 5 browsers. Please include any workarounds like Chrome's --disable-web-security flag.

谢谢!

推荐答案

那么这里是一个很好的博客ABT跨域请求:的http://caffeinelab.net/2011/02/08/cross-domain-requests-state-of-the-browsers/

well here is a nice blog abt cross domain requests: http://caffeinelab.net/2011/02/08/cross-domain-requests-state-of-the-browsers/

IE提供了访问控制做跨域请求。现在坏
  新闻:像往常一样,IE浏览器无法做到像其他人一样,他们有自己的
  非标准的方式来提供。

IE provides access control to do cross-domain requests. Now the bad news: as usual, IE can’t do like the others and they have their own non-standard way to provide it.

而不是常规的XMLHtt prequest的,你需要做一个XDomainRequest!
  此外,它仅适用于公共页面,而不是通过身份验证的页面。
  所以,如果你需要他送饼干,你希望你的应用程序
  在IE中工作,你是pretty多拧。

Instead of a regular XMLHttpRequest, you need to do a XDomainRequest! Moreover, it works only for public pages, not for authenticated pages. So if you need to send he cookies and you want your application to work in IE, you’re pretty much screwed.

和这里是你如何在FFX做到这一点: http://dirolf.com/2007/06/enabling-cross-domain-ajax-in-fir​​efox.html

and here is how you do it in FFX: http://dirolf.com/2007/06/enabling-cross-domain-ajax-in-firefox.html

不知道关于Safari,而Chrome有一个命令行开关这样的:

Not sure about safari, but Chrome has a command line switch for this:

chrome.exe --disable-web-security

请记住,当你启用这个当您访问其他网站你冒着安全。所以一定要小心

Keep in mind when you enable this you are risking your security when you visit other sites. so be careful

希望这有助于

这篇关于什么浏览器允许跨域XMLHtt prequest从本地文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆