Updates are not visible without a page refresh
written-by
Daniel Carrillo Broeder
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Issue
- After editing and publishing a fragment or page, the changes are not immediately visible, but a similar behavior could be reproduced in other ways.
- A manual page refresh is required to see the updated content.
Environment
- Liferay DXP 7.0, 7.1, 7.2, 7.3, 7.4
- Quarterly Releases
Resolution
- This issue can occur when the Single Page Application (SPA) Cache Expiration Time is set to 0 (no expiration) or a higher value.
- This setting can be found in the Control Panel under Configuration > System Settings > Security Tools > Single Page Application.
- To resolve this, set the SPA Cache Expiration Time to -1. This disables SPA caching and ensures that changes are reflected immediately after publishing. Here's how different settings affect page behavior:
-
SPA Cache Expiration Time = -1 (SPA caching disabled, by default):
- Pages and resources are loaded dynamically via JavaScript.
- Changes are reflected immediately.
- This is the recommended setting to avoid cache issues.
-
SPA Cache Expiration Time = 0 or greater (SPA caching enabled):
- Pages and resources are loaded via JavaScript, but previously accessed links are cached.
- This improves performance but can confuse users, as the content they view is cached rather than the latest fresh content.
-
SPA Cache Expiration Time disabled:
- The browser requests a full page reload for every link, disabling the performance benefits of SPA but avoids any kind of caching issues.
- To disable SPA completely, set the property
javascript.single.page.application.enabled=false in your portal-ext.properties file and restart the server.
- It would also be necessary to review any web server, CDN, proxy, firewall or web cache serving Liferay that could be manipulating headers or caching resources.
did-this-article-resolve-your-issue