问题
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:
"Please upgrade to a supported browser to get a reCAPTCHA challenge."
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?
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)
回答1:
First off, have you tried removing the semi-colon?
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.)
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.)
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.
来源:https://stackoverflow.com/questions/42768017/unable-to-reliably-use-google-recaptcha-2-0-and-jquery-2-1-4-because-of-ie-compa