use jquery"s jsonp request to get interface data, which is normal in ie9+ and other browsers, but reports an error in ie8. Later, after demo testing, it was found that the interface of http protocol was normal, while that of https protocol was not.
< H2 > the test code is as follows < / H2 >$.ajax({
// url: "https://randomuser.me/api/?results=5", // ie8
// url: "http://suggestion.baidu.com/su?wd=11&p=3&t=1526957301796", // ie8
// url: "https://api.ipify.org/?format=jsonp", // ie8
// url: "http://api.ipify.org/?format=jsonp", // ie8
dataType: "jsonp",
type: "get",
// jsonp: "cb", // 2url
success: function(res){
console.log(res)
},
error: function(err){
console.log("", err)
}
})
< hr >
in addition, it is also found that as long as the jquery cdn address of https is introduced, such as
< script src= "https://cdn.bootcss.com/jquery/1.2.3/jquery.js"></script>
, it will report
is this a quote that ie8 does not support https? because the official statement has not been found, the answer has not been clear all the time. I hope there can be a clear statement
.