• Resolved hagenb

    (@hagenb)


    Apologies for the long post, but I have to explain everything to get the issue I’m experiencing across.

    Side note – I opened a ticket on litespeedtech but was told to post here. https://www.litespeedtech.com/support/forum/threads/issue-with-cache-on-home-page-for-logged-in-users.21347/

    I’m using “User Menus – Nav Menu Visibility” plugin to display “Login” for users that are logged in and “Logout” and “My Account” for users that are not logged in.

    The problem is that after the user logs in, they are redirected to the “Home” page, if they look in the menu “Logout” will appear (as it should), but if they go to another page and return to the main page, the menu shows “Login” again. They have to manually refresh the page for it to be fixed.

    Disabling cache in the plugin or from CPanel does not fix the issue, but adding the following in my .htaccess does:

    # Begin LSCACHE

    Header set Cache-Control “no-cache, no-store, must-revalidate”

    Header set Pragma “no-cache” Header set Expires 0

    # End LSCACHE

    I have seen this issue being reported on other Cache plugins as well, like this one has exactly the same issue I have – https://ww.wp.xz.cn/support/topic/cache-page-is-being-displayed-to-logged-in-users/

    Any help would be greatly apprieciated.

    Thank you.

Viewing 6 replies - 106 through 111 (of 111 total)
  • Thread Starter hagenb

    (@hagenb)

    I will ask my host provider and get back to you.

    If there is a proxy server in front of my server, what would it mean in regard to this issue? Sorry I don’t know much about servers and proxy servers

    While it’s highly unlikely, it could be the cause. Especially since such a server setting would be beyond good and evil. But even if it is very unlikely, I want to rule out the impossible.

    In the event that there is a proxy server in front of your own server, you could ask your provider whether this proxy might have a configuration that affects cache-control behavior?

    Thread Starter hagenb

    (@hagenb)

    Ok I asked my host provider and will get back to you when I get an answer.

    Do you have access to the WebAdmin control panel of the LiteSpeed web server?

    Thread Starter hagenb

    (@hagenb)

    Unfortunately not.

    Did you try my last code suggestion?

    If this code works and for the case we (you) don’t find the cause for the current issue, you can use this code as a final solution, because it is not uncommon to define the cache-control settings in the .htaccess. I generally do this for all non-WP installations as well.

Viewing 6 replies - 106 through 111 (of 111 total)

The topic ‘Litespeed causing issue with menu’ is closed to new replies.