在IE上使用Ajax调用时遇到403错误 [英] Encountering 403 error while using ajax call on IE

查看:134
本文介绍了在IE上使用Ajax调用时遇到403错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站正在使用Ajax加载页面.除IE会在ajax请求上引发错误403以外,所有浏览器中的页面均已正确加载.但是,即使在IE中,它也可以在localhost中正常运行. (以前它可以正常工作,不知道它何时开始那样工作.)

I've my website loading pages using ajax. The pages are loaded properly in all the browsers except IE which throws an error 403 on the ajax request. However, it works fine in localhost even in IE. (Earlier it use to work properly, not sure when it began to act like that).

您可以在 http://ptamzz.com 上查看我的网站.单击任何文章都会对该内容进行ajax调用.

You can please check my site at http://ptamzz.com. Clicking on any article will make an ajax call for the content.

我该如何解决?由于它收到HTTP 403响应,因此不会返回任何数据,因此无法显示我的页面.

How do I fix it? Since it receives a HTTP 403 response, no data are returned so I'm unable to display my pages.

推荐答案

将其放入您的HTML标头中:

Put this into your HTML header:

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

没有限制,IE< 9兼容模式将在Linux Apache服务器上运行,并且许多功能将无法在IE中正常工作(即使它们与Windows localhost或其他浏览器上的应用程序一起使用也是如此).

Without the line, IE < 9 compatibility mode will be running on Linux Apache server and many functions will not work correctly in IE (even if they work with application on Windows localhost, or in different browser.

这篇关于在IE上使用Ajax调用时遇到403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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