Cloudflare - Exclude Cart, Menu, User data from caching

On my website, how can I Exclude some part of the pages from caching, like the main menu and cart total price, because they are found on every single page of my site, and it is different from user to user, every user have his unique menu ?


You should not cache HTML pages if they are dynamic and contain information that will change for each user. There’s no way to exclude parts of a page from caching, but you can have a developer create a basic HTML without such private information coupled with a JavaScript that will load certain parts after loading.

As far as Cloudflare goes, this would be the territory of Cloudflare Workers.

In the function of page rules