• Resolved mrlb

    (@mrlb)


    Greetings,

    I notice NitroPack has cloudflare integration but on closer inspection it’s for APO.

    But what about cloudflare users that aren’t using APO?

    Well from what I can see you can set a page rule to cache everything and away you go. Both CF and NP seems to work together.

    But what if you’re using pages you need to bypass like eCommerce/logins/admin-area etc?

    Well that’s where I am stuck. CF allows three page rules which isnt enough to set rules to bypass more than 2 pages.

    Perhaps there is away to append a query string to dynamic pages in wordpress and then have one page rules that looks for this string and bypasses for the pages that have it. But I haven’t figured this out yet.

    Has anyone previously had any success or aware of any ideas to make CF and NP play nicely together?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Silvena Koleva

    (@silvenatodorova)

    Hello mrlb,

    Thank you for reaching out!

    By default, NitroPack will not optimize any pages with active login sessions or carts, in order to avoid serving cached content which might not be relevant to the current user experience.

    Also, with the Exclude URLs setting, you can specify a list of pages you would not like to be optimized.

    The free plan of Cloudflare is indeed limited to only 3 page rules. Unless you want to upgrade your plan, the page rules should be chosen wisely.

    If you need any further assistance, please feel free to open a ticket with our support team: https://support.nitropack.io/hc/en-us/requests/new

    Best regards!

    Thread Starter mrlb

    (@mrlb)

    Thanks for your reply @silvenatodorova

    NitroPack is working great there is no doubt about that.

    The issue is getting cloudflare to cache and bypass appropriately – and with the limitation of three rules it is simply not possible to achieve a desirable result.

    To anyone else following this I found a work around that works consistently well with WordPress/Woocommerce + Cloudflare + NitroPack.

    Here’s what you do:
    No changes to NitroPack required.
    Setup a cloudflare work to bypass when it detects a wordpress/woocommerce cookie. Not need to add any page rule that I can see.
    And presto both CF and NP will give you HIT when there are no WP/WC cookies active for the page.

    Now, the interesting finding is that I would actually get slightly better pagespeed scores when you don’t use the Cloudflare worker caching. The difference of a few points. I don’t entirely understand why but I suspect there might be a little added latency to rule to CF worker. So I have decided to turn CF caching off. But I suspect if you a decent amount of traffic then maybe having CF caching on might help. I would have to do a load test to be sure.

    • This reply was modified 3 years ago by mrlb.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Nitropack + Cloudflare (non-APO)’ is closed to new replies.