title: Header Origin vs Host
body: <p>I have a question about the working of the <em>Origin</em> and <em>Host</em> HTTP headers.</p>
  <p>I have an Ajax page &quot;<em>Page A</em>&quot; which will call the Ajax feed &quot;<em>Page B</em>&quot;.</p>
  <p>I saw that the request header of &quot;<em>Page B</em>&quot; from the Ajax call contains the headers:</p>
  <pre><code>Origin: http://example.com
  Host: example.com
  </code></pre>
  <p>However, if I call the &quot;<em>Page B</em>&quot; directly, the request header will only contain the <code>Host</code> header:</p>
  <pre><code>Host: example.com
  </code></pre>
  <p>Thus, I want to know what is the difference between the <code>Origin</code> and <code>Host</code> headers, and why they show up on non-direct calls?</p>
  <p>Can <em>Origin</em> be prepended and passed to server?</p>