title: How can I spoof the user agent of a JavaScript GET request?
body: <p>How can I spoof the user agent of a JavaScript GET request? <a href="http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method" rel="nofollow">setRequestHeader</a> with <code>User-Agent</code> isn't allowed:</p>
  
  <pre><code>xmlHttpRequest.setRequestHeader("User-Agent", "...");
  </code></pre>