Backbone.js的惯于同步在IE中只 [英] Backbone.js wont sync in IE only

查看:71
本文介绍了Backbone.js的惯于同步在IE中只的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人见过这个?我不如何扩大这一点。这是唯一的症状。它不会在IE浏览器同步。

Has anyone ever seen this? I don't how to expand on this. It's the only symptom. It will not sync in IE.

推荐答案

在IE跨域请求通过只调用XDomainRequest的IE特定对象的支持。 XDomainRequest 时,与在其他所有主流浏览器实现了XMLHTT prequest对象进行比较是太基本了!

Cross Domain requests in IE are supported via only the IE-specific object called XDomainRequest. XDomainRequest is too basic when compared with the XMLHTTPRequest object that's implemented in all other major browsers!

我在你使用jQuery的AJAX请求猜测。 jQuery的不使用 XDomainRequest 负责就IE跨域调用,所以你的运气了!

I am guessing you are using jQuery for Ajax-requests. jQuery does not use the XDomainRequest for making Cross-Domain calls on IE, so you are out of luck!

XDomainRequest提供XMLHTT prequest的功能的一个子集。例如,它不可能插入任何自定义标头的HTTP-GET / POST请求,通过 XDomainRequest [通常你会使用jQuery的onBeforeSend回调用于此目的。

XDomainRequest offers only a subset of XMLHTTPRequest's features. For example, it is impossible to insert any custom headers to the HTTP-Get/Post requests, via XDomainRequest [typically you would use the jQuery's "onBeforeSend" callback for this purpose].

请参阅本MSDN文档: HTTP: //msdn.microsoft.com/en-us/library/cc288060(v=vs.85).aspx

Please refer to this MSDN documentation: http://msdn.microsoft.com/en-us/library/cc288060(v=vs.85).aspx.

我遇到所有这些在我目前的项目终于结束了使用代理即mod_proxy的,这是我的托管应用程序中的Apache服务器上。请看看我的相关回答关于这一主题的How为了利用CORS和backbonejs一个Ajax请求的API

I encountered all these in my current project and finally ended up using a Proxy i.e. mod_proxy, on the Apache server that's hosting my app. Please have a look at my related answer on this topic How to make an ajax request to an API using CORS and backbonejs

这篇关于Backbone.js的惯于同步在IE中只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆