You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Wednesday, November 17th 2010, 5:05am

loading XML from another domain

I have my Krpano core files along with images and XML on one domain and I am calling those files from a different domain. But I can't get it to work. Keep getting the Fatal Error / loading or parsing xml.

I know it's not the xml, because pano works if everything is on the same domain. Also if I just do a flash only version it works.

Here is my basic setup, which is on DOMAIN_A:
<script type="text/javascript" src="DOMAIN_B/swfkrpano.js"></script>
<div id="krpanocontent"></div>
<script type="text/javascript">
var viewer = createPanoViewer({swf:"DOMAIN_B/PATH_TO_SWF",target:"krpanocontent",width:"970",height:"620"});
viewer.addVariable("xml", "DOMAIN_B/PATH_TO_XML");

any help would be appreciated,


Wednesday, November 17th 2010, 6:26am

Ok, link doesn't take you there directly but here it is.

Loads a cross-domain policy file from a location specified by the url parameter. By default the Flash Player looks for the policy file located in root of a domain with the filename crossdomain.xml on the server to which a data-loading request is being made. With the crossdomain.url setting the Flash Player can load a policy file from a arbitrary locations.
For more Informations have a look at the Adobe site:…_file_spec.html

<crossdomainxml url="http://.../crossdomain.xml" />
<crossdomainxml url="..." />
<allowdomain domain="" />
<allowdomain domain="..." />
</security>attribute name full variable name type default value
crossdomainxml[...].url security.crossdomainxml[...].url String
Path to the crossdomain.xml on the other server.
attribute name full variable name type default value
allowdomain[...].domain security.allowdomain[...].domain String
Allow access to other domains (necessary for plugins that want access other domains). You can also specify the special domain "*" to allow access from all domains. Specifying "*" is the only way to allow access to nonlocal SWF files from local SWF files that have been published using Access Network Only for the Local Playback Security option in the Flash authoring tool.

I hoe that is what you were looking for.


Wednesday, November 17th 2010, 7:50am

Isn't that specifically Flash related? I am trying to just use the HTML5 Viewer, no Flash.
Anyways, I tried what you suggested it and it doesn't help...

thanks though...


Wednesday, November 17th 2010, 11:48am


cross domain access is even more restricted in Javascript than in Flash,
I'm not sure if there are solutions without proxy servers for this case...

best regards,


Thursday, February 3rd 2011, 2:26am


cross domain access is even more restricted in Javascript than in Flash,
I'm not sure if there are solutions without proxy servers for this case...

best regards,
Hi Klaus,

is there likely to be a solution to this on the Javascript/HTM5 viewer side? I've found that Apache mod_proxy isn't always available in shared hosting environments or other content delivery methods. My situation is that I have various panos in separate containers on a content delivery network so each pano gets a unique subdomain. I link panos via hotspots and use Loadpano() to jump to each. In the Flash viewer it works fine provided there is a crossdomain.xml in each container. Unfortunately it fails in the js viewer and there is no way of doing mod_proxy URL rewriting on the CDN.



Thursday, February 3rd 2011, 3:09pm


I'm using the standard XMLHttpRequest Javascript method for loading the xml files,
and for security reasons this method allows only loading from the same server,


best regards,


Thursday, February 3rd 2011, 11:40pm

Using mod_proxy (or any other proxy method) would negate the effect of using a CDN in the first place, because it "pumps" all the content through the server the proxy is on. I think your only option is to store your scripts on the CDN as well.

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message


Monday, May 16th 2011, 6:16pm

Sooo.. if you want to place a virtual tour on a different domain, than the xml lives, you must use an IFRAME or you will get an xml load failure.
So js fullscreen will never fully work, because it will only fill the iframe.

KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter ::


Monday, November 28th 2011, 2:03pm


cross domain access is even more restricted in Javascript than in Flash,
I'm not sure if there are solutions without proxy servers for this case...

best regards,

And, how to use proxy server with krpanoiphone?


Tuesday, November 29th 2011, 11:45am



And, how to use proxy server with krpanoiphone?
e.g. use a small php script on your own server that loads the file from the other server,
so for the Javascript (krpano) itself it looks like loading a normal file from the same server,

best regards,


Friday, August 12th 2016, 4:14am

I created the crossdomain.xml and upload to the domain. Work well.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "">
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>

I get from this…ec/xdomain.html.