Answer the question
In order to leave comments, you need to log in
Why does reCaptcha load a lot of js and css files?
There are several captchas on the page. In the debugger, it shows the loading of 4 styles__ltr.css and 4 recaptcha__ru.js files. I can't figure out how to fix multiple loading, below is the code:
<script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
var widgetIds = [];
var CaptchaCallback = function() {
var widgets = document.querySelectorAll('.g-recaptcha');
for (var i = 0; i < widgets.length; i++) {
var widget = widgets[i];
var widgetId = grecaptcha.render(widget, {
'sitekey' : 'sitekey'
});
widgetIds.push(widgetId);
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question