由于IE兼容性问题,无法可靠地使用Google reCAPTCHA 2.0和jquery 2.1.4 [英] Unable to reliably use Google reCAPTCHA 2.0 and jquery 2.1.4 because of IE compatibility issues
问题描述
我正在努力寻找一种方法,以使Google的reCAPTCHA 2.0能够为IE用户可靠地工作.某些IE用户正在收到消息:
I am struggling to find a way to get Google's reCAPTCHA 2.0 to reliably work for IE users. Some IE users are getting the message:
"请升级到受支持的浏览器,以获取reCAPTCHA挑战."
这里和其他地方的许多帖子都说要在页面上添加以下meta标签,我已经这样做了:
Many posts here and elsewhere say to add the following meta tag to the page, which I have done:
<meta http-equiv="X-UA-Compatible" content="IE=edge;" />
添加此标签不能解决问题,并且不允许网站用户尝试更改其浏览器设置.
Adding this tag did not fix the problem and asking users of the site to try and change their browser settings is not an option.
还有什么我可以做的吗?
Is there something else that I can do?
我也在IE 11中收到"对象不支持属性或方法'addEventListener'"错误,我怀疑它也与兼容性视图有关. (jquery 2.1.4)
I am also getting "Object doesn't support property or method 'addEventListener'" errors in IE 11 and I suspect it's related to compatibility view as well. (jquery 2.1.4)
推荐答案
First off, have you tried removing the semi-colon?
第二,您引用的错误表明您正在兼容性视图中查看页面. (您可以使用F12工具的仿真"选项卡进行检查.)
Second, the error you cited suggests you're viewing the page in compatibility view. (You can check this by using the Emulation tab of the F12 tools.)
您是将其部署到本地网页还是Intranet站点(例如您的本地网络)?如果是这样,您是否尝试过添加 Web (MotW)到页面?这告诉IE在Internet区域中打开页面,而该页面又应允许x-ua-compatible
标头优先. (默认情况下,IE在兼容性中打开Intranet页面查看.)
Are you deploying this to a local web page or an Intranet site (e.g your local network)? If so, have you tried adding a Mark of the Web (MotW) to the page? That tells IE to open page in the Internet zone which should, in turn, allow the x-ua-compatible
header to take precedence. (By default, IE opens Intranet pages in Compatibility view.)
如果这是一个Intranet站点,或者您可以访问Web服务器头,则还可以
If it is an intranet site or you have access to the web server headers, you can also configure the server to issue the x-ua-compatible
directive instead of specifying within the page.
这篇关于由于IE兼容性问题,无法可靠地使用Google reCAPTCHA 2.0和jquery 2.1.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!