-
Notifications
You must be signed in to change notification settings - Fork 60
JSONP Responses Are text/plain #95
Comments
TouchDB doesn't use any .ini files. Are you sure you don't mean the old Couchbase Mobile For Android, which is a straight port of CouchDB? We don't support that anymore. |
Yeah, sorry. I just took over this project and there's conflicting info on Does TouchDB for Android support JSONP correctly? www.maf.org/rhoads On Thu, May 2, 2013 at 4:39 PM, Jens Alfke [email protected] wrote:
|
I don't think there's any JSONP support; I'm only vaguely aware of what it is, actually. It sounds like this is used for cross-origin script loading. What's the structure of your app like, that causes you to need this? Normally everything is being loaded from the same imaginary domain that's hosted on the device. You might also search the Google group/mailing list to see if this has come up before. |
In general, it's needed for a couchapp to communicate with another couchapp For example, I use JSONP so that the device can check the server for a more I was was also considering this approach to search for other instances of
|
I'm having a hard time why you need JSONP on the mobile device? Please reopen with a little about the use case so we can gauge which milestone this belongs to. |
I don't see how to reopen the issue. But like I said above, there are times when it would be useful for our couchapp running on one device to be able to talk to another instance of the app running on another device. The example I gave above is to check if the app on the other device has a more recent version of the couchapp and if so, kick off a replication. JSONP is necessary to get around the AJAX/browser same origin restriction and do the check against the appinfo.json doc we store the version info in. Remember our users are almost always offline. One guy will get internet access someplace and then he can share the app update "back in the village". Another thing I'd like to do is once I've discovered another app on the network on the Android side of our app (I have this working, BTW and will be posting soon.) is have the couchapp browse to other device's documents to select them for replication. Again, I'd need to make an AJAX call to the other device and thus need JSONP. So it's not needed for a strictly native app, but it is needed for hybrid apps using couchapp. And there's something to be said for feature parity. |
When allow_jsonp = true is specified in the .ini file, jsonp responses should return with MIME type but it's being set to text/plain instead.
The text was updated successfully, but these errors were encountered: