我不明白为什么具有相同请求的同一网页会为Firefox和Internet Explorer创建不同的请求标头。
例如IE有一些授权信息,而FF在我看来它缺少了。
为不同的浏览器生成不同的请求标头的主要原因是什么? (我假设这将给我一个线索,为什么我的WCF服务调用失败,但在IE中工作)
适用于Firefox
OPTIONS http://.....
Host: foo.bar.uk
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
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
Origin: null
Access-Control-Request-Method: POST
Access-Control-Request-Headers: content-type
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
适用于Internet-Explorer
POST http://.....
Accept: */*
Accept-Language: en-us
Content-Type: application/json
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; InfoPath.3; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Host: foo.bar.uk
Content-Length: 19...
Connection: Keep-Alive
Pragma: no-cache
Authorization: Basic xyxzyxyxzyxyzyxz
{"Foo":"bar","KungFoo":"Judo",...}