# Delay loading of recaptcha

**URL:** https://community.gravityforms.com/t/delay-loading-of-recaptcha/13976
**Category:** Get Help
**Tags:** recaptcha, spam, defer
**Created:** [November 30, 2022, 10:16pm UTC](https://community.gravityforms.com/t/delay-loading-of-recaptcha/13976 "2022-11-30T22:16:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jdknopp](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jdknopp](https://community.gravityforms.com/u/jdknopp)
#### Post date: [November 30, 2022, 10:16pm UTC](https://community.gravityforms.com/t/delay-loading-of-recaptcha/13976/1 "2022-11-30T22:16:33Z")

</div>

While it appears GF does defer the recaptcha script, it still has an effect on load time and page weight, which is unavoidable and acceptable in a typical use case, but with a case like footer contact form that appears on every page, this is non-ideal.

Does GF offer a way to delay loading of recaptcha (v2, checkbox) until the form is activated (one of the fields get focus) or the form reaches the viewport? I see similar has been requested a while back but no solution was given publicly:

> [@Can the recaptcha js for a form be defered?](https://community.gravityforms.com/t/can-the-recaptcha-js-for-a-form-be-defered/5459):
>
> We have a page with multiple forms and they all use recaptcha. The recaptcha is making the page load slow. Can the recaptcha js be defered or loaded only when the form is used or is being filled?

FWIW, I’ve used the “load recaptcha on form field focus” approach on a non-WP site and it worked fine, assuming you consider the late appearance of the recaptcha checkbox block acceptable.

---

<div class="post-metadata">

### Author: ![sacom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/sacom/32/53_2.png) [@sacom](https://community.gravityforms.com/u/sacom)
#### Post date: [December 1, 2022, 4:40pm UTC](https://community.gravityforms.com/t/delay-loading-of-recaptcha/13976/2 "2022-12-01T16:40:27Z")

</div>

> [@jdknopp](#):
>
> Does GF offer a way to delay loading of recaptcha (v2, checkbox) until the form is activated (one of the fields get focus) or the form reaches the viewport?

Doing that is not a feature of Gravity Forms. We don’t have any workaround at hand for it either.

I would recommend you to post your request in the [Job Board](https://community.gravityforms.com/c/job-board/34) or consider replacing reCAPTCHA with any of the anti-spam alternatives not requiring front-end loading of resources, you can find a bunch listed here: [https://docs.gravityforms.com/spam/](https://docs.gravityforms.com/spam/)

---

<div class="post-metadata">

### Author: ![jdknopp](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jdknopp](https://community.gravityforms.com/u/jdknopp)
#### Post date: [December 1, 2022, 8:47pm UTC](https://community.gravityforms.com/t/delay-loading-of-recaptcha/13976/3 "2022-12-01T20:47:58Z")

</div>

Thanks Samuel.  
Definitely be a good item for the roadmap IMO.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)
#### Post date: [December 31, 2022, 8:48pm UTC](https://community.gravityforms.com/t/delay-loading-of-recaptcha/13976/4 "2022-12-31T20:48:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
