Sounds to be like using Cloudflare Workers as “Bypass Cache by Cookie” (which is available on a Business or Enterprise plan) if we want to use Cache Everything as described here:
Otherwise, we’d have issues like other visitors, like non-logged-in users would end-up having and seeing the “admin top bar” from the served and cached version of the “logged-in” admin user when visting your homepage or some other webpage → not good.
If they visited the page before login, therefore after, they still see the cached version .html webpage.
After they hit refresh, or fire up Developer Console (F12) with feature “Disable cache”, should se the other version as “logged-in”.
If that does not happen, you might need to flush the cache frome somewhere else to get the “non-cached” version for the “logged-in” user.
I saw similar behaviour using WordPress / W3 Total Cache (Browser cache / Disk Cache) / Cloudflare (Cache Everything).
For example, I visit the homepage, open an article, go back to homepage, not being logged into WP Admin dashboard.
After that, I log into the WP Admin dashboard.
Go back to homepage and see the same cached homepage, there is no “top admin bar” shown indicating I am logged into.
I have to hit refresh or start-up Developer Console (F12) to make it appear.
Sometimes even twice.
Or there was one situation where I have had to “Purge Cache” from W3 Total Cache, so it triggered even purging Disk Cache at the server + Cloudflare Purge Everything (I saw in Audit Logs from my Cloudflare account).
Thereafter, hit F5 (refresh) and woulla, the “top admin bar” appeared.
From my point of view, we shouldn’t use a Page Rule with the option Cache Level: Cache Everything
, except if we’d have some kind of a content extension which isn’t already being listed at the link above, therefore you can remove that option while keep the others.
Furthermore, regarding a WordPress website and login forms and cached content, using Cache Level: Cache Everything
would not be suitable over the whole domain (only on a part of it such as sub-directory, etc.) as far as non-logged visitors would end-up seeing a cached logged-in version of a homepage or an article with the Admin Bar / Logged-in user bar at the top, which would make nosense and confuse and create bad user experience.
For example, if you’d setup your Page Rule like that, but for like https://abc.com/*
, then you’d have the issues as mentioned above and even more like you’d keep that cached at Cloudflare for a month and in user’s device web browser for 5 days. So, even you might not see any new posted content too. That would be an issue then. In case if that happens, disable the Page Rule which is affecting and messing around your Website and use “Purge Everything” from the Cloudflare dashboard → Caching → Configuration tab to clear the cache at the Cloudflare (at least).
It’s a bit tricky to setup “origin cache control headers”, then Browser Cache TTL, Edge Cache TTL and if so, over the top of all that, Cache Everything, and expect it to work fine on a Free plan 