title: JavaScript Same Origin Policy - How does it apply to different subdomains?
body: <p>How does the Same Origin Policy apply to the following two domains?</p>
  
  <p><a href="http://server1.MyDomain.com" rel="noreferrer">http://server1.MyDomain.com</a></p>
  
  <p><a href="http://server2.MyDomain.com" rel="noreferrer">http://server2.MyDomain.com</a></p>
  
  <p>Can I run JS on a page hosted on server1, if the content is retreived from server2?</p>
  
  <p><strong>edit</strong> according to Daniel's answer below, I can include scripts between different subdomains using the <code>&lt;script&gt;</code> tag, but what about asynchronous requests? What if I download a script from server2 onto the page hosted on server1. Can I use the script to communicate asynchronously with a service on server2?</p>