W3C Spec on setrequestheader .
Brief points:
If the request header has already been set, then the new value MUST be combined with the existing value using COMMA U + 002C followed by a space U + 0020 for separation.
UAs may indicate the initial value of the User-Agent header, but MUST allow authors to add values ββto it.
However, after searching the XHR framework in jQuery, they do not allow you to change the headers of the User-Agent or Referer. Nearest:
I am inclined to believe that what you want to do is denied by the security policy in FF - if you want to pass some kind of custom header like Referer that you can always do:
xhr.setRequestHeader('X-Alt-Referer', 'http://www.google.com');
gnarf Aug 12 '09 at 22:24 2009-08-12 22:24
source share