Setting headers in XDomainRequest or ActiveXObject(#39;Microsoft.XMLHTTP#39;)(在 XDomainRequest 或 ActiveXObject(Microsoft.XMLHTTP) 中设置标头)
问题描述
我正在尝试做这样的事情(符合 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看第三点3. 请求中不得添加自定义标头
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') 中设置标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 XDomainRequest 或 ActiveXObject('Microsoft.XMLHTTP') 中设置标头


- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07