• Resolved mammadz

    (@mammadz)


    I got a note from my hosting provider after I complained about performance. One of the things they pointed out was this:

    … I found out that the Mailchimp for WooCommerce plugin is creating a cookie that disabled the server varnish cache.

    Can you confirm that’s the case? It will be super unfortunate if your plugin completely disables my server side reverse proxy cache.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mammadz

    (@mammadz)

    Here is the curl result when the plugin is active:

    HTTP/2 200
    date: Tue, 05 Jul 2022 01:19:03 GMT
    content-type: text/html; charset=UTF-8
    content-length: 252162
    server: Apache

    set-cookie: mailchimp_landing_site=https%3A%2F%2Fwww.essentique.com%2F;
    expires=Tue, 02-Aug-2022 01:19:00 GMT; Max-Age=2419200; path=/; secure;
    SameSite=Strict
    vary: User-Agent
    x-cacheable: NO:Got Cookies
    x-varnish: 4456585
    age: 0
    via: 1.1 varnish (Varnish/6.5)
    x-cache: MISS

    And the curl result below after deactivating the plugin:

    HTTP/2 200
    date: Tue, 05 Jul 2022 02:50:26 GMT
    content-type: text/html; charset=UTF-8
    content-length: 253550
    server: Apache

    cache-control: must-revalidate, public, max-age=300,
    stale-while-revalidate=360, stale-if-error=43200
    vary: Accept-Encoding
    x-varnish: 720993 4554788
    age: 472
    via: 1.1 varnish (Varnish/6.5)
    x-cache: HIT

    • This reply was modified 2 years, 8 months ago by mammadz.
    Plugin Author ryanhungate

    (@ryanhungate)

    @mammadz yes we have been made aware of this and will address in a future release. The problem is, the landing site is important for people as well – so this will require a setting in the plugin to disable this feature. We will do a follow up release to the 2.7 soon that will address this.

    Thread Starter mammadz

    (@mammadz)

    Thanks for addressing this. Could you also describe a little more what is the tradeoff? What would we lose exactly if the feature is disabled?

    Plugin Author ryanhungate

    (@ryanhungate)

    @mammadz if you could please try this filter and add a check in that function for mailchimp_landing_site that should block it.

    As far as using the feature, it’s to track the “first page” someone landed on your site. It helps with tracking where people may have come from for the first time. Some people consider this a proper way to track whether or not a campaign on another domain is forwarding folks to a specific page.

    If you’re not using that currently I don’t see any harm in disabling this cookie – and that should also prevent the cache from reloading.

    Can you please give that a try and let us know if that resolves the issue?

    Thread Starter mammadz

    (@mammadz)

    Hey Ryan, sorry for the delay and thanks for the suggestion.

    Following your suggestion, I was able to remove the cookie, so that worked. To get the cache hit I wanted, I also had to deal with zombie woocommerce session cookies. Once I got rid of that (if cart empty), and not logged in, then I was able to get the cache hit.

    Thanks.

    Plugin Author ryanhungate

    (@ryanhungate)

    @mammadz great – thanks for the follow up. Caching is a complicated subject especially in the ecommerce space. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cookie disabling caching’ is closed to new replies.