title: XMLHttpRequest cross site scripting on same server but different port
body: <p>using XMLHttpRequest it is not possible to open a connection to a document on a different domain than where the page itself is hosted.</p>
  
  <p>but what about different ports?</p>
  
  <p>for example I have a webserver running on my machine listening on port 80 so the webaddress would look like this:</p>
  
  <pre><code>http://localhost:80/mypage.html
  </code></pre>
  
  <p>and I have another webserver running on localhost which is meant to process the ajax requests but listens on a different port. so the javascript in mypage.html would look like this:</p>
  
  <pre><code>var xmlhttprequest = new XMLHttpRequest(); 
  xmlhttp.open("GET", "http://localhost:1234/?parameters", true); 
  xmlhttp.send();
  </code></pre>
  
  <p>would this work? or will it give a security exception as well?</p>