WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
W3 Total Cache & CAPTCHA (8 posts)

  1. Stefan Martinek
    Member
    Posted 1 year ago #

    I use "Really Simple CAPTCHA" plugin on my website and I had to turn off the "browser cashing" in W3 in order to keep Captcha changing (on the first CAPTCHA entry it kept the old value and after an error message the CAPTCHA got correctly reloaded). Is there a better way (e.g. turn off browser caching in the contact page or something else)? Thank you.

    Stefan

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Stefan Martinek
    Member
    Posted 1 year ago #

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

  4. Takayuki Miyoshi
    Member
    Posted 1 year ago #

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

  5. Stefan Martinek
    Member
    Posted 1 year ago #

    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.

    Stefan

  6. Takayuki Miyoshi
    Member
    Posted 1 year ago #

    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: http://wordpress.org/plugins/contact-form-7/developers/

    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.

  7. Stefan Martinek
    Member
    Posted 1 year ago #

    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.

  8. tbradley22
    Member
    Posted 5 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic