CF and Query strings

Dear community, first of all thanks for the support in advance.
I am new here and not very expert with CF, I set up our website www.sonofabarista.com
It is a woocommerce based ecommerce.
I have a CF Business account and I activated APO and ARGO for the cache. I do not have any page rule setup at the moment.

I am having issues related to query strings.
In woocommerce MyAccount page, woocommerce uses query strings when users want to modify the subscription. The link with query send the user back to a product page.
When that happens the query string is some how gone hence any modification does not work.

Moreover, we use a refer a friend program that also use query strings to track referrals and I would like to understand if that will work or not with CF or what I have to do.

Please be patient with me. I really need experts help and I do not know where to start from.

APO only knows about the query strings from this list:
https://developers.cloudflare.com/automatic-platform-optimization/reference/query-parameters

Which Query String(s) are you using?

Woocommerce subscription uses this string to modify existing subscriptions
?switch-subscription=10531&item=0&_wcsnonce=1cb4d844dc

@yevgen checks in from time to time and adds more query strings to the project.

this means that any other query that is not on that list is stripped and will not be read by the website?

No. It’s the opposite of that. Those query parameters are generally used for marketing attribution elsewhere, and the content of your site should not vary based on every different fbclid or other listed query parameter. So Cloudflare removes “cache busting” query parameters before checking the cache.

1 Like

Thank you Michael. Sorry I’m not very expert on this. what does it means? that any other quary should work normally?

It means that query stings on the list get passed through to the server, instead of receiving a cached response.

I understand now. Thank you.
So I am confused on why this string ?switch-subscription= is not working

Good question. I think I got it backwards. I should (almost) always listen to @michael.

I’d also think that anybody modifying a subscription would also have cookies from that list for “always bypass” the cache. Unless that particular link doesn’t require a login.

I don’t suppose you can watch the server logs for this, can you?

1 Like