As we know AJAX is a great tool in making very nice and interactive web applications, but one of it’s drawbacks is the fact that with AJAX we can’t do cross-domain requests because of restrictions imposed by the browser (same-origin policy). To solve this problem one of the most simple and scalable solutions is to insert a script element in the page (the script element is not restricted by the same-origin policy) and get the required data this way. To make this solution easy-to-use, JSON format is used to return the data wrapped in a function call.
Read more