• Resolved audiofoundry

    (@audiofoundry)


    Hi there!

    I have recently made the switch over from using this plugin with Page Rules, to using Cloudflare Workers instead (due to a plugin conflict). So far it has worked great in sorting that issue and everything seems to be running really smoothly.

    However, I did have a question as to whether I needed to add anything to the ‘Bypass cache for the following cookies’ section on wordpress. Presumably, the pages I entered in the “Prevent the following URIs to be cached” section are still in action here, so I am wondering exactly what I should add for best results.

    I note that in other Cloudflare workers scripts, there are cookies stated at the top of the code, for example, this github entry:

    https://github.com/pmeenan/cf-workers/blob/master/cache-bypass-on-cookie/cache-bypass-on-cookie.js

    Here, they have specified:

    const BYPASS_COOKIE_PREFIXES = [
    “wp-“,
    “wordpress”,
    “comment_”,
    “woocommerce_”
    ];`

    Does your own worker script include something similar to this? Or is it intentionally left blank so that users can customize? The cookies listed in the github code seem to be sensible options and I would like to ensure I have those bypassed, but I am not sure if the worker that your plugin automatically adds is already is doing this.

    Any advice you can offer with this would be much appreciated! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    I did have a question as to whether I needed to add anything to the ‘Bypass cache for the following cookies’ section on wordpress.

    – No. That section is needed only if you want to add some additional custom cookie name in the list. The worker by default has a list of cookies for which it will bypass cache. So, in most cases that section will remain blank and you don’t need to enter anything there.

    Presumably, the pages I entered in the “Prevent the following URIs to be cached” section are still in action here

    – Yes that section is in works whether you are using the page rule mode or the worker mode.

    Does your own worker script include something similar to this?

    – Absolutely. You can take a look at the worker script inside the plugin-folder /assets/js/worker_template.js. Screenshot: https://i.imgur.com/4q4GxA5.jpeg

    Or is it intentionally left blank so that users can customize?

    – It has been left blank so that if the user wants to add any additional cookie names on top of the default listed cookies, they can do that.

    Thread Starter audiofoundry

    (@audiofoundry)

    Hi Saumya,

    Thank you for your prompt reply. That all makes a lot of sense!

    That screenshot was really helpful and it’s awesome to know that you have so many important cookies bypassed by default.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Worker Mode Cookies’ is closed to new replies.