A basic demo of same origin policy, jsonp and the new CORS (cross origin resource sharing). Tested with Firefox 3.5+ with firebug installed or the latest chrome

http://bangalore.latest.sopdemo.appspot.com/s/index.html


code is at:

http://github.com/bagheera/sopdemo


some very good docs:
https://developer.mozilla.org/en/HTTP_access_control
http://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy
https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript
http://www.w3.org/TR/cors/