title: Refused to set unsafe header "Origin" when using xmlHttpRequest of Google Chrome
body: <p>Got this error message:
  <code>Refused to set unsafe header "Origin"</code></p>
  
  <p>Using this code:</p>
  
  <pre><code>   function getResponse() {
              document.getElementById("_receivedMsgLabel").innerHTML += "getResponse() called.&lt;br/&gt;";
              if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
                  receiveReq.open("GET", "http://L45723:1802", true, "server", "server123");  //must use L45723:1802 at work.
                  receiveReq.onreadystatechange = handleReceiveMessage;
                  receiveReq.setRequestHeader("Origin", "http://localhost/");
                  receiveReq.setRequestHeader("Access-Control-Request-Origin", "http://localhost");
                  receiveReq.timeout = 0;
                  var currentDate = new Date();
                  var sendMessage = JSON.stringify({
                      SendTimestamp: currentDate,
                      Message: "Message 1",
                      Browser: navigator.appName
                  });
                  receiveReq.send(sendMessage);
  
              }
          }
  </code></pre>
  
  <p>What am I doing wrong?  What am I missing in the header to make this CORS request work?</p>
  
  <p>I tried removing the <code>receiveReq.setRequestHeader("Origin", ...)</code> call but then Google Chrome throws an access error on my <code>receiveReq.open()</code> call...</p>
  
  <p>Why?</p>