if the website http://www.mysite.comhas an external js file added as
http://www.mysite.com
<script src="http://www.yoursite.com/new.js"></script>
in the http://www.yoursite.com/new.jsjs file , there is an ajax call to the script inhttp://www.yoursite.com/new.js
http://www.yoursite.com/new.js
in this case there will be a security problem of a policy of the same origin, since it calls a script on a site from another site?
There will be a problem. new.jsperformed in the field mysite.com, not yoursite.com.
new.js
mysite.com
yoursite.com
EDIT: : mysite.com , script . script : , , mysite.
, mysite.com - . .
. jsonp. , yoursite.com , , .
JSONP - , : http://en.wikipedia.org/wiki/JSON
5 000 , JSONP , . , JSON . "script", , .
jQuery, . : http://api.jquery.com/jQuery.getJSON/
Source: https://habr.com/ru/post/1763428/More articles:Вызов простого веб-сервиса (.asmx файла) из AJAX и JQuery с использованием JSON-parse error - jsonGet xhr object in vb.net when ajax call fails - jqueryAndroid application runs twice in the main menu - androidPlayng video file present in local file system on Android - androidHTML column with multiple columns - javascriptCalling Mathematica from OCaml - wolfram-mathematicaphp does not remove 775 dir chmod - phpWCF services. Create multiple instances at startup? - wcfKernel dump out of sync with gdb stack trace - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1763433/setontouchlistener-not-called-on-viewflipper&usg=ALkJrhjqcaGneOEY7dIMlvJjg1Tpcf-JIwAll Articles