"2nd part: do you know if Grease Monkey's ajax requests set this header?"
No, Greasemonkey's GM_xmlhttpRequest()
does not set this header (although you can certainly add it).
The default request issued by GM_xmlhttpRequest()
looks just like a normal browser request.
For example:
GM_xmlhttpRequest
({
method: "GET",
url: "http://google.com/",
onload: function(response) {alert(response.responseText); }
});
Looks like this to my packet sniffer:
GET / HTTP/1.1
Request Method: GET
Request URI: /
Request Version: HTTP/1.1
Host: google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 115
Connection: keep-alive
Cookie: blah, blah, blah, blah, blah...