
json
Get flash to fully experience Pearltrees
What in the heck is JSONP and why would you use it? | InsideRIA
About You have arrived at this page because InsideRIA is no longer an active website, as of January 31, 2011. While we're sad to see the change, we think you will find the resources and community here at oreilly.com helpful. An archive of the material previously posted on InsideRIA can be found at DevelopRIA.com . O'Reilly Answers is an excellent resource for getting information about everything technology related.The browser security model dictates that XMLHttpRequest, frames, etc. must have the same domain in order to communicate. That's not a terrible idea, for security reasons, but it sure does make distributed (service oriented, mash-up, whatever it's called this week) web development suck. Remote host needs to deploy a crossdomain.xml file, Flash is relatively proprietary and opaque to use, requires learning a one-off moving target programming langage. I'm proposing a new technology agnostic standard methodology for the script tag method for cross-domain data fetching: JSON with Padding , or simply JSONP .
from __future__ import * » Remote JSON - JSONP
Note: Some of the example code presented below uses the JSON Parser and Prototype Framework . You may need to grab yourself a copy of each if you want to follow along. The Concept Just to make sure we’re all on the same page, let’s do a quick rundown of why it’s important to figure out how to load a JSON object on page load.

