“第二部分:您是否知道Grease Monkey的ajax请求是否设置了此标头?”
不,Greasemonkey
GM_xmlhttpRequest()不会设置此标头(尽管您当然可以添加它)。
发出的默认请求
GM_xmlhttpRequest()看起来像普通的浏览器请求。
例如:
GM_xmlhttpRequest({ method: "GET", url: "http://google.com/", onload: function(response) {alert(response.responseText); }});在我的数据包嗅探器上看起来像这样:
GET / HTTP/1.1 Request Method: GET Request URI: / Request Version: HTTP/1.1Host: google.comUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-us,en;q=0.5Accept-Encoding: gzip,deflateAccept-Charset: UTF-8,*Keep-Alive: 115Connection: keep-alivecookie: blah, blah, blah, blah, blah...



