title: Cross-origin resource sharing (CORS) concept
body: <p>I have a question on the concept cross domain JavaScript.</p>
  
  <p>There is server(ex amazon.com) where in only selected domains can use their web-service.
  So definitely, if I try to use their service, from my local, I cannot. 
  I got this on my console </p>
  
  <blockquote>
    <p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading
    the remote resource at
    <a href="http://football20.myfantasyleague.com/2014/export?TYPE=rosters&amp;L=52761&amp;W=&amp;JSON=0" rel="noreferrer">http://football20.myfantasyleague.com/2014/export?TYPE=rosters&amp;L=52761&amp;W=&amp;JSON=0</a>.
    This can be fixed by moving the resource to the same domain or
    enabling CORS.</p>
  </blockquote>
  
  <p>PS: I used jquery cross domain way too, but didnt work.</p>
  
  <p>But if some domain who is among the selected ones, to use Amazon's webservice, has a JavaScript, which if we include in our html, it works.</p>
  
  <pre><code>&lt;script src="http://example.com"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>They have a method to get response by Ajax.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>What happens when we refer a JavaScript file from an internet url. Do we have a local copy running on our machine?</li>
  <li>Is the httpRequest created, will have a request source as my domain or the xyz.</li>
  </ol>