• Hi,

    I’m using your plugin to show content conditionally by browser (for Safari). Without caching it works fine, but with LiteSpeed Cache active, Safari gets the wrong content.

    Could you clarify how your plugin detects Safari to show the appropriate content? Is it via a cookie, user-agent check, or something else? I need this information so I can properly configure LiteSpeed Cache rules (Vary by cookie or user-agent) and ensure the right content is served to Safari users.

    Thanks!

Viewing 1 replies (of 1 total)
  • Hi there,

    Thanks for reaching out to us.

    In regards to your question here, the plugin identifies the user’s browser by leveraging global WordPress variables and server information. Specifically, it uses several global variables provided by WordPress, such as $is_chrome, $is_safari, and others, which indicate specific browser types. These variables are set by WordPress based on the user agent string ($_SERVER[‘HTTP_USER_AGENT’]) during request processing. The plugin relies on WordPress’s built-in browser detection mechanism, which parses this user agent string to determine the appropriate browser type.

    I hope this information helps.

    Kind Regards

Viewing 1 replies (of 1 total)

The topic ‘Issues with cache and Browser-Based Conditional Content’ is closed to new replies.