我以检查网站如下响应使用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" >