[mythtv-users] JSONP callback support in the new services API in .25
Raymond Wagner
raymond at wagnerrp.com
Tue Jan 17 21:18:13 UTC 2012
On 1/17/2012 14:51, Patrick Archibald wrote:
> I am running into the "same origin policy" roadblock while
> trying to use them in a web app. Would anyone else like to
> see Javascript callback function support (JSONP) added?
I understand the problem that JSONP is trying to solve, I just
completely disagree with that solution. Executing JSON directly,
without passing through the sanity checks of a parser, just sounds like
a recipe for disaster. Surely there is a better solution available.
Wikipedia mentions that HTML5 has a 'postMessage' mechanism that gets
rid of the problem entirely.
Alternatively, chances are very good your backend and webserver are at
least on the same network, if not the same host. Why not have whatever
web application you are writing, that needs to provide its own data
independent of the Services API, just proxy those requests to the
backend? That way, everything appears to be coming from the one host?
More information about the mythtv-users
mailing list