IE's Accept headers
According to this blog post from an IE developer, IE is "inconsistent" with its Accept headers. It explains that the extra values you see come from a registry key to which which applications can add their content types, but does not explain why the values from this registry key are not always used:
However, in some navigations, you’ll see that IE sends a more complete string, containing a wide variety of MIME-types. For instance:
image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/msword, application/vnd.ms-excel, application/x-shockwave-flash, */*
Hit F5 to refresh that page, and IE will probably go back to sending / again. Clearly, IE is inconsistent in what it chooses to send in the Accept header, but by now you’re probably curious where these MIME types even come from.
IE generates this list by enumerating the values listed in the following registry key:
HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Accepted Documents
Knowing this probably doesn't really solve your problem. But notice that */*
still occurs in both Accept headers, so as far as content negotiation is concerned there should be no problem here. However, the extra types added to the header could be making the request too large, so that might give you a clue about where to start looking.
Modifying request headers with JavaScript
You can modify the headers of asynchronous (XMLHttpRequest) requests using XMLHttpRequest.setRequestHeader()
method, described on this page.
Also see this question: http://stackoverflow.com/questions/581383/adding-custom-http-headers-using-javascript
Disclaimer: I have not tried using this for Accept headers.
If the requests you want to control are not AJAX requests, however, I'm not aware of any way you can modify these with JavaScript.
Sorry that I've not been able to provide complete answers to both of your questions, but I hope the information I've given is helpful.