• Resolved justsomeguyinla

    (@justsomeguyinla)


    Hi–

    I just installed Comet Cache on my site, https://www.tearfreemonitoring.com/. I activated caching with all default settings and at the bottom of my pages (in the source) I found:

    <!– Comet Cache is NOT caching this page, because the current page contains _wpnonce or akismet_comment_nonce. Note that *nonce* values in the markup are not cache-compatible. See https://wsharks.com/1O1Kudy for further details. –>

    From what I can tell, the only plugin using nonces on my site is Contact Form 7, but it is on every page of my site. I read the article at https://wsharks.com/1O1Kudy and went ahead and enabled caching of nonces globally and set the cache expiration time to 2 hours.

    Caching is working now, but I wanted to make sure I wasn’t missing a better way for getting Comet Cache and Contact Form 7 to play nice together.

Viewing 11 replies - 1 through 11 (of 11 total)
  • @justsomeguyinla We have a GitHub issue open for this — basically, Contact Form 7 is not cache-friendly. The GitHub issue has a few more notes you may want to review.

    @raamdev

    Does Comet Cache work with other form plugins okay?

    @lukecavanagh We have not heard any reports of issues with other form plugins, but I have not tested any others specifically.

    We are actually working towards allowing nonce values to be cached in certain scenarios (when using Logged-In User caching, as each version of the cache is separate and therefore it would be safe to cache the nonce value); see this GitHub issue. However, that won’t solve the problem for anonymous visitors. If a form plugin is using nonce values, there’s simply no safe way to cache that page. The best way around this would be to use a form plugin that doesn’t utilize nonce values, or one that allows disabling them so that the page can be safely cached.

    @raamdev

    Thanks.

    Hi,

    I have the paid version of your plugin which is great however I also manage a lot of websites for clients that use Contact Form 7 so I really need the 2 plugins to work together.

    Would it be possible to safely cache pages for anonymous users if the cache time is set to less than 24 hours (as WordPress nonces have a default lifetime of 1 day)?

    Also, at https://www.ads-software.com/support/topic/wp-nonce/ the Contact Form 7 author mentions that the WordPress nonce being used by Contact Form 7 is not based on a time frame. If this is the case can you ignore the nonce being generated by Contact Form 7 and still cache the page?

    Thanks

    prompos123

    (@prompos123)

    Has there been any updates to this issue recently? Is there any workarounds to get Comet Cache working on sites that have Contact Form 7?

    Luke Cavanagh

    (@lukecavanagh)

    @prompos123

    Could you just not exclude the page URL that the Contact Form 7 form is being used on in Comet Cache?

    prompos123

    (@prompos123)

    Unfortunately the form is on every page of the site.

    Luke Cavanagh

    (@lukecavanagh)

    @prompos123

    So the form is in the footer then or somewhere else?

    prompos123

    (@prompos123)

    Sidebar

    Same here, pages that contain a CF7 form aren’t being cached.

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Comet Cache Not Caching Pages because of Contact Form 7 nonce’ is closed to new replies.