Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Language navigation not working

Avatar

Level 1

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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>

View solution in original post

9 Replies

Avatar

Level 5

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.

Avatar

Level 1

Page should automatically refresh when I press back button. 

And yes, the issue is still there in Incognito mode as well. 

Avatar

Level 5

On your publisher, is it working fine?

Avatar

Level 1

No. Its not working

Avatar

Level 5

You can write some JS code to trigger a hard reload, ensuring the content gets updated when navigating back to the page.

Avatar

Community Advisor

@VineeVa Is this a Single Page Application ?

Avatar

Level 1

No its not a single page application

Avatar

Correct answer by
Community Advisor

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>

Avatar

Administrator

@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!



Kautuk Sahni