I’m sharing this story as it is something you might encounter when using Internet Explorer 11 with Google’s CAPTCHA service (code).
This came up in UAT testing recently for a web product I work on so I thought I would share. It might save you some time explaining to your customers about cross browser compatibility testing.
First off, Google has a free service for trying to detect bots on your site called “CAPTCHA”. CAPTCHA is an acronym for “Completely Automated Public Turing Test to tell Computer and Humans Apart”.
Google’s free CAPTCHA service called reCAPTCHA requires developers to register your website to get an API key which you will use along with some code to call the API from your site. Pretty cool stuff, right?
I’m really simplifying this but to render the reCAPTCHA you would insert their code snippet. Make sure the code is loading from a a page using the HTTPS protocol or else it might not work.
<html> <head> <title>reCAPTCHA demo: Simple page</title> <script src="https://www.google.com/recaptcha/api.js" async defer></script> </head> <body> <form action="?" method="POST"> <div class="g-recaptcha" data-sitekey="your_site_key"></div> <br/> <input type="submit" value="Submit"> </form> </body> </html>
Once the reCAPTCHA is loading on the page, it will be loading its contents in an IFRAME. This is really important to our story!
There are links in the Google CAPTCHA that point to a privacy page and terms of service page on the Google.com domain which both have a “target =_blank” attribute on the link. This means these links should open in new windows or tab depending on other pressed keys.
The links are working just fine in Chrome and Firefox and opening in new windows but not IE 11.
What is the issue here?
It could have been earlier than IE 11 but, Microsoft implemented a security feature to restrict links loading in IFRAMES from linking out to a domain other than the one it originally loaded from.
The CAPTCHA code is loading from your WhatEverDomain.com but all the links in the IFRAME are pointing to the Google.com domain are now all disabled.
Here is a video on how to install Google reCAPTCHA for your website. Good luck and happy coding!