WordPress.org

Support

Support » Plugins and Hacks » W3 Total Cache » Don't cache a page if it was accessed by a mobile device?

Don't cache a page if it was accessed by a mobile device?

  • Andrew W

    @andrew-whitacre

    I’m wondering if it’s possible to tell W3 Total Cache “Don’t cache a page when it’s a mobile device that’s doing the original loading”?

    My issue is a little hacky, but I have two versions of an image in header.php, one set to load for desktops/tablets and the other to load for phones. But obviously whichever version loads first is the one that gets cached and, in turn, served to all devices until the cache expires.

    I know it’s easy to prevent a mobile device from being sent a cached page (the user agent settings, etc.), which I’ll need to do in any case for this to work, but I’m wondering if it’s possible to tell W3TC not to cache a page in the first place if the user agent is a mobile device.

    Is it?

    (Let me point out I have a model in my head of how the caching of a page works, and for all I know I might be wrong. My mental model is that W3TC’s caching of a page can work in two ways: with pages being cached upon the first visit of a user to that page, and/or, optionally, as “preloading”, with W3TC loading and caching small batches of pages in the background over time.)

    http://wordpress.org/plugins/w3-total-cache/

  • The topic ‘Don't cache a page if it was accessed by a mobile device?’ is closed to new replies.
Skip to toolbar