Search code examples
angularjshtmliframeinternet-explorer-11meta

IE11 iframe cross domain not working


I am having application build with angularjs. We are giving option to embed the application on there own website.

Problem is the application is working fine in IE11 but when that is iframed to the different domain website then it's not working.

I have also added this <meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1" />

But still it's not working. Is there any hack to make it work ?


Solution

  • Angular loads views and dependencies via ajax. You need to enable CORS in the server in order to be allowed to make cross domain ajax requests.

    If you are using PHP in the backend, for example, it would be something like this:

    <?php
     header("Access-Control-Allow-Origin: *");