You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently page caching leads to stale menu when using the back button after login.
We are exploring options to load it using JavaScript, but it likely won’t happen due to pure implementation barriers. Each theme can customize the output of the menu items with custom classes or even custom html structures. No way (currently known) for us to reliably duplicate that properly for every site, which means it would need to be a one off custom solution for each site.
Possible Solutions
Build it 90% and let the user paste in some custom code from their theme to handle actual rendering. This means we fire the AJAX call, load the menu and run it through a custom renderer entered by the user, returning it for rendering in place.
Use the jQuery.load() method to refetch the same page with cache buster, returning only the menus we need. Replace them on the page with these. This probably only needs to be done when we detect a stale copy of the page somehow.
Add data attribute or classes to each menu item rendered so that we can dynamically remove them using Async JS call to server for login status and permissions.
Workarounds
Disabling browser caching of page html on those pages while leaving on server level page caching. This has had decent results with minimal page load impacts as our sites have minimal html and the CSS/JS/Images are still cached in the browser. Not the best option, but a viable one.
The text was updated successfully, but these errors were encountered:
Currently page caching leads to stale menu when using the back button after login.
We are exploring options to load it using JavaScript, but it likely won’t happen due to pure implementation barriers. Each theme can customize the output of the menu items with custom classes or even custom html structures. No way (currently known) for us to reliably duplicate that properly for every site, which means it would need to be a one off custom solution for each site.
Possible Solutions
Workarounds
The text was updated successfully, but these errors were encountered: