We're working a product that serves dynamic widgets/content to different websites. We use Echo2 to build our widgets, hosted on our own servers. In other words, we embed Echo2 in an existing Web page that can have a different host than the Echo2 host. This encounters a problem with AJAX's same origin policy, namely that the browser can only make AJAX request to the same domain name.
Currently we solve this problem by using a proxy that forwards the AJAX requests to our servers. This solution has limitations in websites where we are not allowed to access their backend to even setup a proxy.
What we would like to do is replace the AJAX requests with something like JSONP which can make cross domain requests. We are thinking of converting the XML to JSON on the server side, and then back from JSON to XML on the client side.
It would be great if you can point out where in the code we can make these changes. Or any advice/suggestions/thoughts on the feasibility of this idea. Any help would be highly appreciate. Thank you.