!! 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.

imagem de Rene Hennig
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
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Sulamita Garcia (Intel)

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

imagem de Rene Hennig

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

Faça login para deixar um comentário.