我有一个在 Spring MVC 中构建的基于 ajax 的站点。在标题上,它显示已登录的用户和一个用于浏览其他页面的菜单。单击菜单页面时通过 ajax 调用更改,菜单/标题保持不变。这是我面临的一个问题,
1- Logged in as user1
2- Click Profile Page to see its profile (via ajax loads fine)
3- Open another tab, open the same site, logged out and log in as user2
4- Come back to First Tab, click Profile Page again
This time it shows profile of User2 but on header/menu its still showing User1
如何实施此解决方案?还是这里有更好的解决方案?
-- As soon as a user is logged out, the web site should refresh to login page on all tabs where its opening on same browser.