Like many Pro users, I’m rather (very!) frustrated that we can’t use the ‘Bypass Cache on Cookie’ page rule. This makes caching HTML pages a nightmare and dangerous for a CMS like Wordpress.
I was thinking about a workaround. A lot of my traffic comes from ads, like Google Ads.
Could I create a page rule, something like;
URL Match: mydomain*?googleurlparameter * (ignore the space before the last star)
Setting 1: Cache Everything
Setting 2: Edge Cache TTL 1 month
So the idea would be it would cache the HTML page, only when someone visits the page from an ad (which for my case would be a logged in user, so no admin bar).
And in theory, Cloudflare would not cache the page for me, when I’m logged in as an admin on the front end, because I won’t have that URL parameter.
If the above works (big if), would that URL Match cache any URL that includes ?googleurlparameter anywhere in the URL?
EG. mydomain/mypage?googleurlparameter (yes it would cache)
mydomain/mypage/mysubpage?googleurlparameter (yes it would cache)
Once the page has been cached in the scenario no1 above, would a non logged in user be presented with the cached page? I’d hope so but, not sure how this works yet.
EG. Someone visits the site by using the direct URL - mydomain/mypage , will they get the performance benefit / cached page?
Thanks in advance for your thoughts.