Fill a small pit, Vue does not support IE8 and below, cross-domain Ajax does not support IE9

Source: Internet
Author: User

This special is embarrassed, said the Vue support IE8 and below, introduce jquery, test IE browser, IE9 still show abnormal,

However, the command line test Vue still exists,

Data is not coming back! Data is not coming back! Data is not coming back!

All right, meat buns, beat the dogs, $.ajax. The request is gone ...

Is jquery.1.11.1.min.js too high? Why jquery.1.8.1.min.js that?

Baidu: IE9 Ajax released

Well, a bunch of cross-domain issues, but the interface doesn't restrict the domain name.

Since the network is not sent out at all, that is the browser problem

jquery Ajax IE9 and the following browse cross-domain non-execution issues: http://blog.sina.com.cn/s/blog_502b92330102w7pc.html

Workaround
  • Write before the Jquery.ajax call jQuery.support.cors = true ( This method cannot be resolved only )
  • For access denied is caused by the browser security mechanism, the workaround is 点击IE浏览器的的“工具->Internet 选项->安全->自定义级别”将“其他”选项中的“通过域访问数据源”选中为“启用”或者“提示”,点击确定就可以了 (but this method requires the user to set a less realistic )
  • (recommended) for browser cross-domain IE10+ 才支持withCredentials属性 , IE9- 不支持,跨域对象只能用XDomainRequest对象,而jQuery并不兼容XDomainRequest.. for this method there are resolved jQuery-ajaxTransport-XDomainRequest plugins on the network


Okay: The use of jQuery Ajax cross-domain plug-in jquery.xdomainrequest.min.js (http://www.qianduan.org/post-304.html)

jquery xdomainrequest is a jquery plugin that leverages Xdomainrequest objects for IE8, IE9 for cross-domain resource sharing (Cors-cross Origin Resource sharing).

Ajax.html:
<script src= "Http://libs.cncdn.cn/jquery/1.11.1/jquery.min.js" ></script>
<script src= "Http://libs.cncdn.cn/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js" ></script>

jquery is introduced below. Ok

Fill a small pit, Vue does not support IE8 and below, cross-domain Ajax does not support IE9

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.