WordPress.org

Ready to get started?Download WordPress

Forums

WP Mobile Detect
Desktop sometimes shows Mobile (3 posts)

  1. SloBros
    Member
    Posted 1 year ago #

    In Chrome with browser cache enabled and using w3tc total cache on the site, the mobile menu sometimes shows after visiting the page for the first time, then shows the desktop correctly after refreshing.

    After clearing the browser cache, it happens again later.

    It might be a crazy thought, but could it be due to someone visiting the mobile site, then w3tc caching the page, and then showing that cached mobile page to someone else who visits on the desktop?

    http://wordpress.org/extend/plugins/wp-mobile-detect/

  2. Andrew W
    Member
    Posted 11 months ago #

    Hi SloBros -- that's basically what's happening to me, best I can tell.

    In my case, I need different versions of a logo to appear on desktops/tablets vs. phones. I use WP Mobile Detect to do some "if" statements in header.php to determine which version of the logo to serve.

    But then caching gets involved: whichever version gets cached first is the version that gets served to all devices until the cache expires.

    Did you end up figuring out a workaround?

  3. MaximumFish
    Member
    Posted 9 months ago #

    I'd also like to know if a workaround or fix was ever found for this. I'd like to start using some sort of cache but a lot of my pages rely on showing different content to different devices.

    Anybody have any luck with it?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic