使用HTTPS AJAX请求在IE中存在的问题(不跨域) [英] Problems with HTTPS Ajax Request In IE (Not Crossdomain)
问题描述
我难倒一个问题我在使用IE浏览器中只有HTTPS Ajax调用。 IE浏览器似乎认为我在做一个跨域请求,但我不是。 //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.
推荐答案
您会不会发生在使用你的头基地的标签,你会?如果它指向http来代替https,这会破坏IE浏览器。我们有一个人在工作中有一个类似的问题苦苦挣扎,那就是这个问题。
You wouldn't happen to be using the "base" tag in your head would you? If it is pointing to http instead of https, that would break IE. We had a guy at work struggling with a similar problem and that was the problem.
这篇关于使用HTTPS AJAX请求在IE中存在的问题(不跨域)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!