Visitors come to pages on the website via ads that cause dynamic query string parameters to be used, for example:
I want to ignore that query string parameter so when the user lands on the site they’ll use the cached version of the page that would be served up via:
Otherwise, all users that come in via these sorts of query strings get an uncached page.
I thought I had a solution, but then I read this: Understand Cloudflare Caching Level – Cloudflare Help Center
Ignore Query String only disregards the query string for static file extensions. For example, Cloudflare serves the style.css resource to requests for either style.css?this or style.css?that
Since my pages have no extension, it seems I can’t accomplish the sort of caching I’m looking for on the pro plan.
One workaround I really don’t want to do would be to give each page a static extension, such as “.css” or “.doc” (I could probably do this with some server-side routing, but it wouldn’t be pretty and may impact SEO at least initially).
Another option would be to upgrade from pro to enterprise (to create custom cache keys), but I suspect the client will not be a fan of the added cost (it’s apparently so expensive they don’t even list the cost). I also don’t know if enterprise would have a similar limitation I might run into.
Another option potentially to be to use a Cloudflare worker to remove the query strings at the edge, but I’m unsure if that’s viable as I haven’t tried it yet.
Are there any other options you can think of, or am I stuck with one of these workarounds?