• Resolved Dekadinious

    (@dekadinious)


    Hello!

    This is a hard one to reproduce, and it’s just random luck that I found the error. I got a message about expired NONCE when I tried to test my MailChimp submission form on my page today. I Googled a bit and found that a WordPress NONCE is actually meant to be used multiple times, and is included in the cache of some plugins. When the NONCE expires and is still present in the cache, the error occurs.

    A WordPress NONCE supposedly lasts for 12 hours, and the default LightSpeed Cache setting is 168 hours. I purged the cache and the problem disappeared, so I set my cache setting to 8 hours just in case. I would really like a longer cache, but I am not experienced enough to really deal with this problem.

    Could anyone explain to me why it happened, how to avoid it and if it’s a bug with the plugin that caches things that should not be cached?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hi, @dekadinious

    Is the MailChimp submission form on a single page?

    One way to deal with this, if you don’t want to shorten the period of time your entire site is cached, is to exclude the submission form page from the cache entirely.

    Just enter the path to the page in the Settings > Excludes > Do Not Cache URIs box. After that, you can put your site’s TTL back up to 168 hours. Purge the cache, and you’re good to go.

    Hope this helps!

    Thread Starter Dekadinious

    (@dekadinious)

    Thanks for answering!

    I am going to have a lot of pages including the front page with such a form, so if it exists a way to do this without excluding every single page that would be best.

    If not, I can work with it ??

    Looking forward to hearing from you!

    Plugin Support Hai Zheng?

    (@hailite)

    If it is a widget, you can easily fix it by setting the TTL to 12 hours too.

    Or you can use ESI to make it.

    Thread Starter Dekadinious

    (@dekadinious)

    I’m not sure I follow.

    It’s a plugin set on the page with a shortcode.

    What is ESI?

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    ESI stands for Edge Side Includes, and it’s a way to “punch a hole” in a cached page and treat the content within that hole differently than the rest of the page. It’s perfect for this application, actually.

    If the form is generated with a plugin, the best way to handle it is to ask the plugin developer to make it LSCache-ESI-compatible. There are instructions in our API wiki page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘NONCE Error in MailChimp Form’ is closed to new replies.