Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The library should support the option of using JSONP for cross site communication with Fluidinfo #43

Open
ntoll opened this issue Aug 15, 2011 · 0 comments

Comments

@ntoll
Copy link
Member

ntoll commented Aug 15, 2011

JSONP is a "hack" that allows cross site calls without using CORS (although I believe its capabilities are limited). It has been suggested that it'd be useful for fluidinfo.js to support JSONP calls (see https://twitter.com/#!/renedudfield/status/102723431413452800).

I think this is a good idea since JSONP works on a wider range of browsers than CORS does. Also, Fluidinfo appropriately supports JSONP calls to it (see http://doc.fluidinfo.com/fluidDB/api/http.html#support-for-jsonp).

I suggest a flag is passed at time of instantiation to indicate the library should use JSONP for cross-site calls rather than the default CORS method:

  fi = fluidinfo({username: "username", password: "password", jsonp: true});

If I remember correctly, any fix will also need access to the DOM in order to make the JSONP hack work.

Finally, it should be opaque to the user how we're making the call to Fluidinfo (either CORS or JSONP). Their main concern is that the damn thing works. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant