Table of Content
JSON-P
JSON-P means JSON with padding.
For security reason, browser rejects JavaScript loading resource from the other sites.
The following version works without security errors of cross-domain accessing resources.
The callback=?
is to tell jQuery getJSON method to use the JSON-P approach instead of cross-domain JSON loading. For security reason, browser rejects JavaScript loading resource from the other sites (domains other than where the JavaScript is executed). Either enabling cross-domain resourcing sharing in server or allowing the JSON-P in server can by pass this security restriction.
What’s next? We’re going to take a look at “Preparing graphics”.