Hi! Im bulding an offline web application on sencha touch 2. My problem is 
that xmlHttpRequest fails with status 0 and empty response when doing a get 
to a Rest API. The problem only occurs when using a cache.manifest file, 
there is no problem when running it as a normal website. Next I describe 
what happen between diferrent Android versions:

Android 2.x: The request fails as I said and no error is reported on DDMS. 
I do have * on the NETWORK section of my cache.manifest file. The 
interesting thing is that it works the first time I acces the website, so 
it seems that it only happens when the application is in cache, but also, 
if I do a refresh it works too. So to make it work I need to open the 
website and then refresh.

Android 3: The request also fails as I said, but this time I get an error 
on DDMS saying "Console: XMLHttpRequest cannot load 
http://10.30.84.122/HttpService_deploy/MobileRest/MobileRestService.svc/.... 
Origin http://10.30.85.32 is not allowed by Access-Control-Allow-Origin". 
But the problem is that I have the "Access-Control-Allow-Origin: *" header 
on the Rest API server. With this version it works the first time I run the 
app, but after its on chache it doesnt work any more, not even doing the 
"refresh trick".

Android 4: Works OK.

Chrome on desktop: Works OK.

So please, any ideas? Thank you!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to