• Resolved Craig

    (@craigrkirkby)


    Hi There,

    First of all, we’re very excited to test the new Siteground Optimizer and look forward to rolling it out with all our clients who use Siteground.

    However, we’ve noticed a problem occurring that, after much testing, we’re convinced is related to the caching plugin and the themes we use.

    The problem in a nutshell: occasionally our mobile menu incorrectly displays on a desktop device. It happens intermittently.

    Our theme developer feels this is the issue: “The way the the theme menu works, it checks for the body class no-touch (only exists for desktop visitors) and touch (for mobile visitors). So, if someone visits the site using mobile, the plugin caches the page. If someone then visits the desktop, they will be presented with the wrong menu. Some caching plugins have options to cache separately, for example W3 Total Cache. Does SG Optimizer offer such an option? You could utilize this to ensure everyone sees the page they are expected to.”

    Can you please advise?

    Kind regards,
    Craig

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    You can simply split caches between user agents. Add this to your .htaccess file and purge the cache:

    <IfModule mod_headers.c>
    Header append Vary: User-Agent
    </IfModule>

    That will lower the dybamic-to-cached ratio but will ensure that you have different cache pools for mobile and desktop viewers.

    Thread Starter Craig

    (@craigrkirkby)

    Thank you for your very prompt response, Hristo.

    I’ll give that a go. Much appreciated. Siteground rocks!

    Is it possible to add this as a selection option under say the “frontend optimization” panel of the SG Optimizer in the future?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Caching problem between mobile and desktop?’ is closed to new replies.