Viewing 8 replies - 1 through 8 (of 8 total)
  • reCaptcha is used in so many website. In a real world your user may not even make a single call to reCaptcha js. It will load from browser cache.

    So it may add load in site speed during test, but in real it will not have any impact to user browsing.

    Thread Starter Der-Bank-Blog

    (@der-bank-blog)

    Interesting thought. How do you come to this conclusion? Is there a source from Google that says, it is cached in the browser across all Websites?

    recaptcha js is cached for 5 minutes. So any request within this time will be loaded from browser. It is browser behavior not recaptcha. Please see https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching

    V3 may not work from cache of another website as this require site key in url parameter. But once is loaded from your website will be used from cache. Also note google server use HTTP/2.0 which means it load all of its require files from single tcp connection.

    According to google doc https://developers.google.com/recaptcha/docs/v3#placement google suggest to place captcha not only in form pages but also all other pages of your website. But according to your suggestion you are not even loading captcha script in form pages also. So if you load during user fill up form it may not work as expected and give you false positive.

    After that also if you want to load according to your suggestion, that will also be possible. But that will be required a little knowledge in php and js.

    Thread Starter Der-Bank-Blog

    (@der-bank-blog)

    Thanks for this interesting Input Shamin. As I tried out V3 I came back to V2 because it is more transparent for the user and seems to have has less load Impact. Nevertheless I still think it is not only a test-issue, but a real site-load issue. Even on a contact page with HTTP2 it takes over 1 second for loading.

    Interstingly Google does not neglect this in its own Lighhouse-Tool as a type of Bonus, but Forces to improve it.

    So if there is a way for improvement loading, it would be worth looking at it.

    You can load as you mentioned. Add remove_action( 'wp_footer', 'anr_wp_footer' ); in your theme’s functions.php. This will remove loading script from this plugin. Then add the way mentioned in that link.
    You can also see anr-captcha-class.php to see how script loaded in this plugin.

    Thread Starter Der-Bank-Blog

    (@der-bank-blog)

    Thanks. But I am not a programmer. So the idea was, that if you see a Chance to integrate such a loading-option in your plugin, it would be apreciated

    It will be hard to implement this in any plugin which will be used in many websites.
    It will raise many compatible issue.

    In a single website we can easily target html but generalize it will be hard.

    Also google now not only determine bot by using just click or invisible, it analyses user behavior in background which will be interrupted if we load script inside another script on focus.

    After that also if somebody have better knowledge about this and think that way is better, then i may include this in future.

    Thread Starter Der-Bank-Blog

    (@der-bank-blog)

    OK. Thanks a lot

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘reCaptcha and Site Speed’ is closed to new replies.