Title: Incorrect Captcha optimization
Last modified: December 22, 2020

---

# Incorrect Captcha optimization

 *  Resolved [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/)
 * Somehow the Autooptimize feature calculates the wrong Javascript code. At a certain
   point ‘wpcf7_recaptcha’ is transferred into ‘recaptcha’ ! Enabling the try-catch
   leads to even more worse results.
 * Using 2.8.1.
 * Any ideas?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fincorrect-captcha-optimization%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13821805)
 * Hey maria_wp ;
    Let’s start with some questions; * what are your JS optimization
   settings (when on)? * what JS errors do you see on the browser console when JS
   opt. is on? * where/ how do you see ‘wpcf7_recaptcha’ is transferred into ‘recaptcha’?
 * frank
 *  Thread Starter [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13822530)
 * Hi,
    Just a quick response to the last two points:
 * Error appears on the browser console indicating that the root cause is an autooptimze…
   js File. Clicking on the error code I conclude my third point.
 * Try catch enable in the js setting won’t load the page at all. The rest I need
   to check.
 * Maria
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13822541)
 * OK, but can you provide the exact JS error message Maria ?
 *  Thread Starter [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13822563)
 * Yeah, now problem I’ll paste the console output when I have it.
 *  Thread Starter [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823221)
 * Hi Frank,
 * I’ve uploaded screenshots to ImgBB since I have no clue how else to post details.
   The screenshots will be deleted in one week.
 * Konfig:
    [https://ibb.co/TK6ggD1](https://ibb.co/TK6ggD1)
 * Main site with different browser and different exceptions
    [https://ibb.co/X7qTxNC](https://ibb.co/X7qTxNC)
   [https://ibb.co/QYyVS6d](https://ibb.co/QYyVS6d)
 * Blogsite (as mentioned in the inital report)
    [https://ibb.co/6H289QC](https://ibb.co/6H289QC)
 * I hope these details help.
    thx maria
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823421)
 * I think the problem is due to AsyncJS asyncing the Google Recaptcha JS ([https://www.google.com/recaptcha/api.js](https://www.google.com/recaptcha/api.js)).
   Can you try with AsyncJS off or with google.com/recaptcha excluded from being
   asynced?
 *  Thread Starter [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823483)
 * Yeah – your are right. Turning off seems to solve the problem.
 * Excluding won’t help. I tried the following setting
 * recaptcha__en.js, jquery.js, recaptcha__de_at.js
 * But the problem persists. When you look on the responses from the browser the
   last name is loaded but I have no clue why this variation is loaded. I don’t 
   know if its the locale from the browser or the WP.
 * Is there a way to leave it enabled? Adding google.com/recaptcha won’t help neither.
 * maria
    p.s.: Site note: Save of AsyncJS won’t delete the Cache. ie. I need to
   manually reload it. I think it would be great if the Cache would be automatically
   purged when save changes.
 *  Thread Starter [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823491)
 * Note: I haven’t installed anything like a recaptcha plugin.
 *  Thread Starter [maria_wp](https://wordpress.org/support/users/maria_wp/)
 * (@maria_wp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823504)
 * I figured it out: Adding `api.js` to the `Scripts to Defer` solved the problem.
 * Thx.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823511)
 * Happy you got it working Maria 🙂
 * Feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * frank

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Incorrect Captcha optimization’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/incorrect-captcha-optimization/#post-13823511)
 * Status: resolved