什么是crossdomain.xml 文件? [英] What is crossdomain.xml file?

查看:38
本文介绍了什么是crossdomain.xml 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其实我希望我知道从哪里开始...

Actually I wish I knew where to start from...

我在我的个人网站中嵌入了第三方 SWF 图片库控件.

I have embedded an third party SWF image gallery control, in an personal website of mine.

SWF 是 XML 驱动的.我按如下方式动态加载 XML 文件....

The SWF is XML driven. I load the XML file on the fly as follows....

  var flashvars = { xmlPath: "http://www.example.com/xml.aspx" };
                var params = { allowFullScreen: "true", wmode: "transparent", allowScriptAccess: "always"};
                var attributes = {};
                swfobject.embedSWF("main.swf", "gallery", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

问题是页面没有按预期工作.实际上它只适用于 Firefox,不适用于 Chrome 或 I.E.

The problem is that the page did not work as expected. Actually it worked only in Firefox, not in Chrome or I.E.

使用 fiddler 检查请求后,我发现文件 crossdomain.xml 没有找到.所以,stackoverflow 帮我找到了一个示例...

After checking the requests with fiddler, i found that the file crossdomain.xml was not found. So, stackoverflow helped me finding a sample...

<?xml version="1.0" ?>
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="master-only"/>
  <allow-access-from domain="*"/>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

添加 crossdomain.xml 后,网页现在可以在 Firefox 和 I.E.在 Chrome 中我仍然有问题.

After adding the crossdomain.xml the webpage now works in Firefox AND I.E. In Chrome i still have a problem.

所以这里有几个问题...

So here are a couple of questions...

1) crossdomain.xml 是什么?

1) What is the crossdomain.xml?

2) 如何让我的网页也能在 Chrome 中运行?

2) How can i make my webpage work in Chrome too?

推荐答案

"跨域策略文件是一个 XML 文档,它授予 Web 客户端(例如 Adob​​e Flash Player、Adobe Reader 等)处理数据的权限跨多个域.".取自 Adob​​e 网站 http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html.

"A cross-domain policy file is an XML document that grants a web client—such as Adobe Flash Player, Adobe Reader, etc.—permission to handle data across multiple domains.". Taken from Adobe website http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html.

问题 2 的答案:Flex crossdomain.xml在 Chrome/Firefox 中无法正常工作?.为开发人员、Fiddler(或类似的)安装 Adob​​e Flash Player,这些工具应该会让你的生活更轻松.另请阅读 http://kb2.adobe.com/cps/839/cpsid_83950.html.

Answer to question 2: Flex crossdomain.xml not working correctly in Chrome/Firefox?. Install Adobe Flash Player for developers, Fiddler (or similar), these tools should make your life easier. Also read http://kb2.adobe.com/cps/839/cpsid_83950.html.

这篇关于什么是crossdomain.xml 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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