Working with private content
It is time to travel to the last sea in our JavaScript voyage: private content. Let me start with a simple explanation of what it actually is and why we need it. As you remember from the previous chapters, one of the caches in the platform is full page cache. It means that the entire HTML content rendered by the framework is being computed and persisted. This means that the HTML content of the page everyone is visiting is the same. In an e-commerce platform, we need to show unique content, such as a shopping cart or a wishlist, to each visitor browsing the page.
That is why a mechanism was developed, and it was named private content.
Private content refers to content that is specifically tailored for individual users. It is user-specific and is not shared between different online customers. Adobe Commerce uses various mechanisms, such as customer data sections and browser local storage, to manage and deliver this private content without needing to...