Is it possible to avoid AJAX cross domain request limitation if JS file with $.getJSON is loaded from the same server (domain) as URL in AJAX request? Let's say I have a webservice on serverA.com which needs to be called from pages on few other domains e.g. subdomain.serverA.com, serverB.com etc. JS is placed on serverA.com and included on multiple pages on different domains with absolute URL:
<script src="http://serverA.com/ajax.js" />
while page URL is e.g. http://serverB.com/page.html
In such case, $.getJSON('http://serverA.com/service/',...
will avoid cross domain limitations or not?
In other words, browsers are looking at page URL or JS source URL when evaluating same-origin policy for AJAX requests?