Hub Site Global Navigation Not Updating

Copper Contributor

Hi there,

 

I have a teamsite "Werfkeet" which is the main hub site. In the hub I have 3 other Team sites. Each Team site is supposed to have the same global navigation at the top of the page. The Team site of the main hub site has the "SharePoint Server Publishing Infrastructure" feature enabled.

 

When I edit the navigation by clicking on edit on the main hub sites navigationbar it doesnt update the navigation on all hub sites. I've been testing a little bit and found out that when I reset my browser's cashe it does load correctly but I can not ask of the entire company to reset their browser cashe everytime there's an update to the SharePoint navigation.

 

Things I've tried:
- Turning off cashing in the navigation element settings of the main hub site.
- Turning off cashing in the navigation settings of the main hub site.
- Leaving the site alone over night to see if the navigation did update on its own the next day

 

I've seen many posts about this problem:
- https://techcommunity.microsoft.com/t5/sharepoint/hub-site-top-navigation-suddenly-disappeared/m-p/1...
- https://techcommunity.microsoft.com/t5/sharepoint/menu-not-updating/m-p/1309625
- https://techcommunity.microsoft.com/t5/sharepoint/cannot-update-hub-site-navigation/m-p/252314
- https://techcommunity.microsoft.com/t5/sharepoint/problems-editing-hub-site-navigation/m-p/252647

 

All similar to the problem I'm having (most the exact same thing) and none of them have a clear answer on how to fix the issue so that I can roll out new navigation to everyone simultaniously and easily without having to ask employees to do something to be able to see the update to the navigation.

 

Does anyone know of a solution to this problem?

1 Reply
I have faced the similar issue in past. So, after weeks of trying different approaches, I was finally able to achieve this with some custom piece of code.

The problem here is that SharePoint Online stores the Hub navigation in browser cache. A database called ODSP_DB is holding the navigation nodes. Users cannot see the navigation updates unless they clear browser cache (which eventually refreshes the database) or logout and login to the system.

To overcome this issue, you have to clean the DB with custom JS Code and unregister a service worker from the browser, which actually forces the browser to rebuild the ODSP_DB and the navigation nodes.

I have placed the sample code on my blog. May be it will help someone until a proper way is announced by Microsoft.

http://fixingsharepoint.blogspot.com/2022/11/sharepoint-online-hub-navigation-not.html