Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Recaptcha javascript loading multiple times

I'm including the Google Recaptcha on my website in the following way;

In the header section;

<script async src='https://www.google.com/recaptcha/api.js?hl=fr'></script>

And in the body section (I've removed my key for the sake of the example);

<div class="g-recaptcha" data-sitekey="*"></div>

Yet when the page loads, the Google Chrome console shows the following;

Google Chrome Console

Does anyone have an idea of what's going on? Why is seemingly the same 69.0kb file being loaded 3 times?

like image 698
Sefam Avatar asked Jan 12 '17 15:01

Sefam


1 Answers

Answering for anybody who comes across this later.

This is addressed in a GitHub issue here. Recaptcha runs across multiple frames, so it's loaded multiple times since each frame needs access to the script. This is intended behaviour, apparently.

like image 165
Tim Avatar answered Nov 04 '22 11:11

Tim