Hi everyone,
I have a question regarding LiteSpeed Cache and dynamic content. We have a login button in the navigation that changes based on the user's logged-in state. If the user is logged out, it shows "Login," and if logged in, it shows "My Account."
Example HTML:
Since no specific cookie is set for this, we cannot use the usual Cache vary on cookie method.
I've searched the forum but haven't found a clear answer—perhaps I am not using the right keywords.
Is there a way to exclude only this specific button from caching while keeping the rest of the page cached? Maybe through ESI (Edge Side Includes) or another method?
Thanks in advance for any insights!
I have a question regarding LiteSpeed Cache and dynamic content. We have a login button in the navigation that changes based on the user's logged-in state. If the user is logged out, it shows "Login," and if logged in, it shows "My Account."
Example HTML:
PHP:
<li menuitemname="Login" class="nav-item-btn is-right" id="Primary_Navbar-Login">
<a class="btn btn-primary" href="/login.php">
<span>Login</span>
</a>
</li>
OR:
<li menuitemname="Login" class="nav-item-btn is-right" id="Primary_Navbar-My_Account" >
<a class="btn btn-primary" href="/dashboard.php">
<span>Dashboard</span>
</a>
</li>
I've searched the forum but haven't found a clear answer—perhaps I am not using the right keywords.
Is there a way to exclude only this specific button from caching while keeping the rest of the page cached? Maybe through ESI (Edge Side Includes) or another method?
Thanks in advance for any insights!