Support » Plugin: W3 Total Cache » W3 Total Cache & CAPTCHA

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frederick Townes


    Did you talk to the plugin author about how browser caching could be used? It’s one of the most basic performance optimizations and every developer should consider those today.

    I did not. I expected that it is linked to my W3 setup. I will talk to them. Thank you.

    I’m testing them on my environment but haven’t seen problems so far. What page cache method do you use?

    In the Total Cache under the “page cache”, I have the following selections: (a) cache post page; (b) cache feeds; (c) cache request only for www site address; (d) don’t cache pages for logged in users.

    Since I found this problem I turned off “Browser Cache” which probably caused all problems.

    To make some test, I temporarily turned on “browser cache” just a minute ago. In the “browser cache” I have a default setup from W3 plugin. Under “global browser cache policy”, I have selected:

    (a) set last-modified header
    (b) set expires header
    (c) set cache control header
    (d) set W3 total cache header
    (e) enable HTTP (gzip) compression
    (f) prevent caching of objects after setting change

    You can do a following test now:

    (a) send me some test message and enter CAPCHA — all will be fine for the first time;
    (b) send a second message and you will get an error since previous CAPCHA is now cached on your browser.

    Thank you.


    OK. Thanks for the information. I think I could figure out and solve the problem in the development version. You can download the “Development Version” from here:

    As you’re using WordPress 3.4.2, you need to update WordPress before trying the development version. It needs WordPress 3.5 or higher.

    Thank you Takayuki. I will stay with the WordPress 3.4.2 for now since I found that the new WordPress creates problems with some other widgets. When you will have update for 3.4.2 I will use it. Best.

    I had the same problem using really simple captcha with contact form 7 and w3 total cache for wordpress 3.2.1.

    I was able to fix it by modifying the wpcf7_remove_captcha() and wpcf7_cleanup_captcha_files() functions in /contact-form-7/modules/captcha.php

    1. wpcf7_remove_captcha() –> i commented out the remove function so that a captcha image is never removed while generating a new captcha image

    $captcha->remove( $prefix );

    2. wpcf7_cleanup_captcha_files() –> i changed the cleanup time from default 60 min to 1440 minutes (1 hour) by passing the integer 1440 in the cleanup() function.

    return $captcha->cleanup(1440);
    if ( $stat['mtime'] + 86400 < time() )

    That is a fix for contact-form-7 but you can make the same edits to the really simple captcha functions as well. To to that just change the default $minutes in the cleanup function from 60 to 1440.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘W3 Total Cache & CAPTCHA’ is closed to new replies.