Search code examples
aem

Prevent Component reloading - AEM


I have 2 pages in my web application. Lets say an home page and news feed page. When user clicks a hyperlink on home page then she/ he gets redirected to News feed page. I have 2 separate components in each page like

Home Page --- Header Component & Home Page Details Component. News Feed Page --- Header Component & News Feed Details Component.

Both the pages has a common component Header. Can I prevent component reloading for the header component when users reaches the second page by clicking link on the first page.

By component reloading I mean the HTML code (HTL) code in the component should not be updated again with updated data instead for the second page, I just want to show the same data associated with header component in the first page.


Solution

  • A new page will always be loaded as a whole, because of just how [HTML] page loads work. What you are looking for is a single page application. They are possible with AEM but are a pain to design, especially the authoring mode behaviour.