On dispatcher URL- when we change language from the hamburger menu, then the page content is getting loaded according to the chosen language.
But when we go back to previous language page by clicking on the browser back button, then the page content is not updated, only the URL gets updated. (no network calls.)
Note: I am using language navigation core component.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
The issue occurs because the browser serves the previous page from its cache without making a new network request, leading to outdated content.
To fix this, proper cache-control headers (no-store, no-cache, must-revalidate) should be set on language switch pages to force a reload.
Try below approaches:
1. Add this to your Apache/Dispatcher configuration (vhost.conf or dispatcher.conf)
<LocationMatch "^/content/your-site/.*$">
Header always set Cache-Control "no-store, no-cache, must-revalidate, private"
Header always set Pragma "no-cache"
Header always set Expires "0"
</LocationMatch>
2. Ensure Apache mod_headers is enabled On the server:
a2enmod headers
service apache2 restart
<LocationMatch "^/content/your-site/([a-z]{2})/.*$">
Header always set Cache-Control "no-store, no-cache, must-revalidate, private"
</LocationMatch>
HI @VineeVa ,
I think this might be happening because of browser caching. Can you try doing a hard reload or opening the site in incognito mode to see if the issue still occurs? That should help confirm if it’s a cache-related issue.
Let me know if it works or you need more help.
Thanks.
Views
Replies
Total Likes
Page should automatically refresh when I press back button.
And yes, the issue is still there in Incognito mode as well.
Views
Replies
Total Likes
On your publisher, is it working fine?
Views
Replies
Total Likes
No. Its not working
Views
Replies
Total Likes
You can write some JS code to trigger a hard reload, ensuring the content gets updated when navigating back to the page.
Views
Replies
Total Likes
No its not a single page application
Views
Replies
Total Likes
The issue occurs because the browser serves the previous page from its cache without making a new network request, leading to outdated content.
To fix this, proper cache-control headers (no-store, no-cache, must-revalidate) should be set on language switch pages to force a reload.
Try below approaches:
1. Add this to your Apache/Dispatcher configuration (vhost.conf or dispatcher.conf)
<LocationMatch "^/content/your-site/.*$">
Header always set Cache-Control "no-store, no-cache, must-revalidate, private"
Header always set Pragma "no-cache"
Header always set Expires "0"
</LocationMatch>
2. Ensure Apache mod_headers is enabled On the server:
a2enmod headers
service apache2 restart
<LocationMatch "^/content/your-site/([a-z]{2})/.*$">
Header always set Cache-Control "no-store, no-cache, must-revalidate, private"
</LocationMatch>
@VineeVa Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!
Views
Replies
Total Likes
Views
Likes
Replies