I have implemented xdomain scripts on both client and server end, but in IE9 keep getting a 'Timeout waiting on iframe socket' warning

StackOverflow https://stackoverflow.com/questions/23619734

Question

On the client, I have:

<script src="js/plugins/xdomain.min.js" slave="https://api/proxy.html"></script>

Then on the server, I have a proxy.html with:

<!DOCTYPE HTML>
<script src="js/xdomain.min.js"></script>
<script>
  xdomain.masters({
    "https://*.localhost" : '/.*/',
    "https://*.host.net" : '/.*/'
  });
</script>

In dev tools on IE9, I have xdomain logging:

 'proxying request to slave:'
 'new socket:'
 'Timeout waiting on iframe socket'

I'm not seeing any data being passed to the client - i.e -my models within my controllers are empty.

Was it helpful?

Solution

You should open up your proxy.html in a browser and see if it is sending a 'X-Frame-Options' header, if it is, this will be preventing IE9 from opening up the page in an iFrame. You will have to turn off the 'X-Frame-Options' header for proxy.html, and then it should work.

OTHER TIPS

In my case, this was happening because the xdomain.js file wasn't accessible (403) from the proxy.html file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top