cross-domain

Can I do synchronous cross-domain communicating with window.postMessage?

偶尔善良 提交于 2019-12-12 08:54:16
问题 I'm thinking of using window.postMessage directly for cross-domain communication. If I do: postMessage() from the parent frame Load an iframe window.addEventListener("message", callback, false); from the child iframe When will the messages I posted before loading the iframe be executed? Are they guaranteed to be executed at all? Are there timing guarantees? I would like to pass a parameter from the top frame that influences the initialization of the child frame. 回答1: The postMessage()

SECURITY_ERR: DOM Exception 18 when applying document.domain on both sites. How do I resolve this?

纵然是瞬间 提交于 2019-12-12 08:48:00
问题 I have a page at an internal server, server1.mydomain.com/page.jsp and another page at a different internal server, 10.x.x.x:8081/page.aspx. On server1.mydomain.com, I set document.domain in page.jsp like this: //page.jsp on server1.mydomain.com document.domain = document.domain; When I issue an alert on document.domain, it comes up as server1.mydomain.com. On the 10.x.x.x server, I set document.domain in page.aspx, as a result, like this: //page.aspx on 10.x.x.x document.domain = "server1

send request as jsonp, interpret response as text, using jQuery 1.5

三世轮回 提交于 2019-12-12 08:12:51
问题 Short question: is there a way to make a jsonp request to a server, capture the request, but not parse it as javascript? I am using dataType: "jsonp text" in jQuery 1.5 but it is not working. I'm trying access a cross-domain URL via AJAX with jsonp. The problem is that the other domain (a directory listing at my university) is very old and I doubt the server supports jsonp. In Firefox, I get a "XML tag name mismatch (expected META)" error. In chrome I get a "Uncaught SyntaxError Unexpected

What is Firebase's cross-domain policy?

萝らか妹 提交于 2019-12-12 07:45:48
问题 How does Firebase handle cross origin issues, and what are the underlying security concerns and how are they handled? 回答1: Ways to Connect There are multiple ways to communicate with the Firebase servers, and these include: Firebase Client - One of the officially-supported client libraries, currently including JavaScript (both for Web and Node.js), ObjC (iOS and Mac OS-X), and JVM (Android and Java). REST API - Accessible via https://<your-firebase>.firebaseio.com . CORS Policy Firebase uses

How to access different domain data using Java script

自闭症网瘾萝莉.ら 提交于 2019-12-12 06:18:25
问题 Here is the issue. Suppose there is a DOMAIN A which is going to be the server containing a PHP Script file. The data from Domain A is to be accessed by a Client at DOMAIN B . I know it cannot be accessed directly using JavaScript. So what I did is, in Domain A I created a a JavaScript file as front-end for the PHP Script which AJAXes the PHP and returns the data. But unfortunately it din't work I came across an example having PHP as a Middle Man in the client side. But I donot want to keep

Cross-domain post to external site fails on wordpress

守給你的承諾、 提交于 2019-12-12 05:29:38
问题 I'm trying to post data to an external website from a wordpress site using Javascript, however when i send the form i'm getting this: XMLHttpRequest cannot load https://external_site.com/embed/documents. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://my_site.com' is therefore not allowed access. The response had HTTP status code 404 I'm trying to this from a Wordpress site, this is

How this plugin can read RSS feeds without cross-domain issue?

馋奶兔 提交于 2019-12-12 05:09:56
问题 I have deployed this plugin on my local server http://jquery-plugins.net/FeedEk/FeedEk.html It works but I can't see any php script : how can it work without cross-domain issue ? 回答1: It uses google api which can crossdomain everything =) http://ajax.googleapis.com/ajax/services/feed/load?.... take a look at yql var yql=function(a,b){ return 'http://query.yahooapis.com/v1/public/yql?q='+ encodeURIComponent('select * from '+b+' where url=\"'+a+'\"')+ '&format=json'; }; usage var crossdomainurl

jQuery indexOf error for xdomain.js cross-domain link script

99封情书 提交于 2019-12-12 04:57:49
问题 I'm using a script to detect cross-domain links for google analytics cross-domain tracking. The original script (xdomain.js) was provided by the great folks at Luna Metrics. Here is the script with my modifications, hat-tip to educardocereto here on StackOverflow for the suggested changes to enable setAllowAnchor in the GATC (I've commented line 40 where the console error first points to): var jQueryXD = jQuery.noConflict(); /* I added var because page loads 2 versions of jquery - not the

Image tag src-attribute: Session lost with mobile connection

孤街浪徒 提交于 2019-12-12 04:49:44
问题 I use an <img> tag with an src-attribute pointing to a script that loads the image from a non-public folder. When I test my website with a mobile connection, the scr-attributes path is changed from src="http://example.com/get_image.php to src="http://1.1.1.1/bmi/example.com/get_image.php , I guess that has something to do with my mobile internet provider. The problem is, the image-providing script cannot identify the session of the incoming request anymore. On a non-mobile WIFI connection,

Flash and multiple domain / sub domains => crossdomain.xml?

余生颓废 提交于 2019-12-12 03:57:50
问题 I am trying to use a flash script (plupload) on all my domains and sub-domains hosting it on my static sub-domain. The swf file is placed on my static.mydomain.com/path/to/file.swf And I want to use this file on my others domains and subdomain like : www.mydomain.com or asubdomain.mydomain.com I also would like to use it on another domain extension for the same domain name, like : mydomain.net But I fail to use it. And if I put the swf file on my subdomain where I want to use it, it works