title: Same-Origin Policy and serving JS from a CDN
body: <p>I want to serve my JavaScript scripts from a CDN like cloudflare.</p>
  
  <p>Now my scripts communicate with my app server via ajax. Wouldn't the same-origin policy restrictions come into play when I load these scripts from a CDN?</p>
  
  <p>Let's say my app is on the domain:</p>
  
  <pre><code>http://app.com
  </code></pre>
  
  <p>And I load my scripts from</p>
  
  <pre><code>http://cdn.com/xyz/all.js
  </code></pre>
  
  <p>Now, since my scripts are loaded from a different domain than the domain my app is running from, I guess the same origin policy would prevent me from doing ajax communication with my app.</p>
  
  <p>Am I getting something wrong?</p>