IE中的HTTPS Ajax请求的问题(非交叉域) [英] Problems with HTTPS Ajax Request In IE (Not Crossdomain)

查看:294
本文介绍了IE中的HTTPS Ajax请求的问题(非交叉域)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,我有一个HTTPS Ajax呼叫在IE只。 IE似乎认为我在做一个跨域请求,但我不是。以下代码从 https://mydomain/customer_profile.php 页面调用:

I'm stumped on an issue I'm having with an HTTPS Ajax call in IE only. IE seems to think I'm making a crossdomain request, but I'm not. The following code is called from the page https://mydomain/customer_profile.php:

$.ajax({
    type: 'post',
    url: 'https://mydomain/ajax/retrieve_transaction_details.php',
    data: /* my data is here */,
    success: function(response){
        // do something with the response
    },
    error: function (xhr, ajaxOptions, thrownError){
        alert(xhr.status);
        alert(thrownError);
    }
});

此请求在除IE之外的每个浏览器中都很好。在IE中,错误函数返回错误:访问被拒绝。就像我说的,我完全厌烦这个,所以任何洞察力或想法将是巨大的。

This request works just fine in every browser except IE. In IE, the error function returns "Error: Access is denied". Like I said, I'm completely stumped on this, so any insight or ideas would be great.

推荐答案

使用HTML中 head 部分中的 < base>

I guess you are using the <base> tag inside the head section of your HTML; right?

如果指向 http ,而不是 https ,将破坏 IE

这篇关于IE中的HTTPS Ajax请求的问题(非交叉域)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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