问题描述
我试图做这样的事情(W3兼容,DOM):
I'm trying to do something like this (W3 compliant, DOM):
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest' );
有关的ActiveXObject(Microsoft.XMLHTTP')
和 XDomainRequest
(IE8)。我有没有这样的运气的任何地方发现它在微软的文档,甚至谷歌。任何想法我如何能做到这一点?
For ActiveXObject('Microsoft.XMLHTTP')
and XDomainRequest
(IE8). I'm having no such luck finding it anywhere in microsoft documentation or even google. Any idea how I can achieve this?
推荐答案
参照这个帖子http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx见点33.没有自定义头可以添加到请求
Referring to this post http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx See the point three 3. No custom headers may be added to the request
您不能添加自定义标头的XDR对象。希望这有助于。
You cannot add custom headers to an XDR object. Hope this helps.
这篇关于设置在XDomainRequest或ActiveXObject的标题(“Microsoft.XMLHTTP”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!