title: How does Google sets HTTP Referrer after a search result click
body: <p>For example, the first search result on <a href="https://www.google.ru/search?hl=en&amp;q=How%20does%20Google%20set%20the%20HTTP%20Referrer&amp;gws_rd=cr&amp;ei=G1RpVpalMuO6ygPOqr-YBg" rel="nofollow">this page</a> leads to the older SO question, with the following HTTP request:</p>
  
  <pre><code>GET /questions/4402502/how-does-google-set-the-http-referrer-when-someone-clicks-on-a-search-result-lin HTTP/1.1
  Host    stackoverflow.com
  Referer https://www.google.ru
  </code></pre>
  
  <p>Note, that:</p>
  
  <ol>
  <li>Only the domain is included in the Referer header, no query string.</li>
  <li>Google is open via HTTPS, while SO is open via plain HTTP - nevertherless, the Referer header is sent by the browser.</li>
  <li>There are no server-side redirects involved, the first HTTP query to open after the click is to the target site.</li>
  </ol>
  
  <p>The question is, how do they achieve this?</p>