WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Don't cache a page if it was accessed by a mobile device? (1 post)

  1. Andrew W
    Member
    Posted 11 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic