• Resolved Aleksandar

    (@aivanov12)


    Hello. Could you tell me if browser caching works for logged in users on the site, given their role is excluded from the cache. If not, is it possible to enable this for them? And if enabled, could it harm their operation (login details, cookies, etc.). My site is membership based. People pay to create an account and log in to read our posts.

    I use OpenLiteSpeed and LiteSpeedCache.

    Thanks a lot.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • serpentdriver

    (@serpentdriver)

    Browser cache is not a cache plugin feature, because it is part of the HTTP protocol and it is used to cache static sources like css, js, images and so on, so for browser cache it doesn’t matter if a user is logged-in or not. Cache plugin is a server side cache and has nothing to do with browser cache, but with cache plugin you can control the cache TTL for static sources.
    https://www.freelancinggig.com/blog/2019/07/04/what-is-the-difference-between-server-and-browser-cache/

    Regardless of browser cache you can enable server side caching for logged-in users. https://docs.litespeedtech.com/lscache/lscwp/cache/#cache-logged-in-users

    Thread Starter Aleksandar

    (@aivanov12)

    If so, what is this feature that I have active? Does it actually work?

    /wp-admin/admin.php?page=litespeed-cache#browser

    serpentdriver

    (@serpentdriver)

    If so, what is this feature that I have active? Does it actually work?

    This is what I already described. This function doesn’t enable anything, because browser caching is available all the time and without cache plugin as well. This setting is only to set custom Time-To-Live values for browser caching, but again browser cache has nothing to do with server side caching that the cache plugin is good for.

    Thread Starter Aleksandar

    (@aivanov12)

    Understood. Can you tell me, is this the tutorial my hosting provider should follow to enable Browser Cache? https://openlitespeed.org/kb/how-to-set-up-custom-headers/ And how to avoid some WordPress dashboard bugs that occur after enabling headers, such as a problem with dynamic menus in WordPress dashboard. For example, when I hover over “New”, the “Post, File Upload, Page, User” dropdown does not appear. When the headers from the aforementioned tutorial are enabled.

    serpentdriver

    (@serpentdriver)

    One more time, browser cache feature is always enable on every web server and you don’t have to enable it or to set extra header in OLS control panel. If there is no custom TTL for browser cache defined each browser uses default settings, but this default settings have to be customized. Customizing this setting you can do with cache plugin function for browser caching. If you have set any headers for browser caching in OLS remove them.

    If you have any issues with your frontend this is not browser cache related, so remove cache headers in OLS, enable browser caching and set 31536000 for TTL. Purge the cache in plugin and check your frontend for any errors.

    If there are still issues with your frontend the way to find the best settings use presets.

    Thread Starter Aleksandar

    (@aivanov12)

    I got it. Can you tell me on my site how I can make sure the Browser Cache is working? What to look for in the developer console. Can you review if BrowserCache is working on my site?

    serpentdriver

    (@serpentdriver)

    Just check the “expire” header.

    Thread Starter Aleksandar

    (@aivanov12)

    Is this it? Is it working correctly for me?

    https://i.ibb.co/hdCv23g/cats.jpg

    serpentdriver

    (@serpentdriver)

    Yes, it is and it works, but browser cache is for static sources only, so select any other request with a static source like css, js or image.

    Thread Starter Aleksandar

    (@aivanov12)

    Wow, now I understand. Thank you very much! Blessings!

    • This reply was modified 2 years ago by Aleksandar.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Browser cache’ is closed to new replies.