!! Encapsulator 2.0: XMLHttpRequest: Origin http://__app is not allowed by Access-Control-Allow-Origin.

!! Encapsulator 2.0: XMLHttpRequest: Origin http://__app is not allowed by Access-Control-Allow-Origin.

Rene Hennig's picture
Hi, the encapsulator 2.0 can't load data via Ajax. Got some console messages: Message: XMLHttpRequest cannot load http://-here-the-url-for-ajax-request. Origin http://__app is not allowed by Access-Control-Allow-Origin. Please, please, please fix this as soon as possible! Thanks in advance! Rene
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Sulamita Garcia (Intel)'s picture

Hi Rene

This behaviour is actually a security feature defined by W3C.

Encapsulator 1 was based on Webkit which enforced this loosely. Encapsulator 2 is based on Chrome, which isn't so forgiving. There is an article offering some insight and maybe a workaround here http://appdeveloper.intel.com/en-us/blog/2012/02/06/loading-local-xml-files-javascript. Maybe it will help you.

Regards, Sulamita

Rene Hennig's picture

Of course an ajax call via jsonp works perfect but not all (customer) sources are supporting the callback function.

On the other hand: It works in the Encapsulator 1.0 so why not in 2.0?

Cheers,
Rene

Login to leave a comment.