Ajax请求"访问被拒绝"在IE浏览器 [英] Ajax request "Access is denied" in IE

查看:692
本文介绍了Ajax请求"访问被拒绝"在IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以检查网站如下响应使用Ajax请求,

I use ajax request in order to check response of websites as follow,

$.ajax ({
    url: 'https://www.example.com',
    cache: false,
    success : function() {
        alert(new Date() - start)               
    }, 
}) 

它适用于所有浏览器本地PC。当我把它放在服务器上,它工作于Chrome和Firefox,但不是在IE8。

It works on my local pc in all browsers. When I put it on the server, it works in Chrome and Firefox but not in IE8.

我得到的错误:访问被拒绝jquery.min.js

为什么会出现这个错误?

Why am I getting this error?

推荐答案

对于我来说,这个问题是因为兼容模式的结果。我在内部网​​和Internet Explorer与兼容模式下运行。 我添加下面的标记,这解决了我所有的问题。它迫使IE浏览器不使用兼容模式。

For my case the problem is resulted because of compatibility mode. I am in intranet and internet explorer is running with compatibility mode. I added following tag and this solved all my problems. It forces IE to not use compatibility mode.

<meta http-equiv="X-UA-Compatible" content="IE=Edge" >

这篇关于Ajax请求&QUOT;访问被拒绝&QUOT;在IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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