Poor website behavior when users log in due to caching

My website includes a Learning Management System. Visitors become users with accounts after they log in the first time. When a user logs in, I dynamically change the menu and footer items from “Login” to “My Stuff” or “Logout.” Due to caching, the menu “remembers” the previous state and still says “Login” when some pages are clicked even after the user logs in. How can I set up Cloudflare to work properly?

May I ask if your LMS is based on WordPress maybe? If yes, are you using Cloudflare APO? :thinking: If not, then please see my below suggestions.

Nevertheless, may I also ask if you’ve got Auto Minify options enabled for HTML, CSS & JS at Cloudflare dashboard → Speed → Optimization? Try disabling them too.

Kindly, may I ask you to check out what option have you got selected by navigating to the Cloudflare dashboard → Caching → Configuration → find section “Browser Cache TTL” and make sure the selected option from the dropdown menu is “Respect Existing Headers”.

Furthermore, from the same menu, click on the blue button saying “Purge Everything” to flush the cache at Cloudflare Edge, just in case.

Wait for a minute or two.

Refresh a page in your Web browser, otherwise try clearing your Web browser cache or use a different Web browser to test out again.

Are you using some custom-made Page Rules with an option like Cache Level: Cache Everything?

Are you using Rocket Loader? May I ask have you tried disabling the Rocket Loader feature at the Cloudflare dashboard → Speed → Optimization? :thinking: It might be there is some conflict with the scripts while loading them.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.