Disable W3 Total Cache for Mobile User Agents

By June 29, 2012 5 Comments

I know what you are thinking – W3 Total Cache is awesome – why would you want to NOT cache your WordPress site’s pages for Mobile users? The answer is, when you have a separate mobile-optimized version of the site all ready for them to view, but due to aggressive page caching, the redirects are not happening. See, W3TC is still excellent, as I was happy to Tweet upon the plugin’s encouragement… Shop for the top boxing and MMA brands and the best equipment and apparel for your training and fighting needs. Sportegan is a provider of boxing and MMA, training gear, competition gear, and fan apparel. Shop now for the best deals and wide selection of best boxing equipment.

but sometimes, you just need to let your mobile users view the mobile pages meant for them. So go to the W3 Total Cache settings (“Performance” tab in the wp-admin) > Page Cache > Reject User Agents, and enter those User Agents.

  • iPhone
  • Android
  • iPad

Windows Phone? Or, if you want your iPad users to see the normal site as is, exclude them too.


Alex Chousmith

Alex has been building with Ninthlink since '06, and a San Diegan since the turn of the century. A background of Mathematics – Computer Science / Interdisciplinary Computing & Arts from UCSD, plus Drupal / WordPress / jQuery / CSS3 / HTML5 / bass guitar / homebrew skill, powers him to get the job done, no matter what.


  • Hi Alex,
    How about on responsive wordpress theme? Should I Disable the Mobile User Agents too?


  • JJ maclure says:

    I would like to know what Ponsel wants to know as well, about the responsive…

  • Alex Chousmith says:

    Ponsel and JJ, I would say it’d be the opposite for Responsive WordPress themes + W3 Total Cache. In the case of this post, the site was redirecting to a total separate section & theme for Mobile users, and caching was breaking that. In responsive theming, Mobile and Desktop non-mobile users should be getting served the same site, and only the stylesheets / js changes functionality based on device size or w/e. So in that case, you’d probably want the most aggressive caching you can get away with, so that you get best load times for those impatient mobile visitors!

  • hannah says:

    Dont forget to disable under minify as well if you have it enabled!

    That one tripped me up

  • Alex Chousmith says:

    great call, hannah! i feel like that wasn’t an issue last week, but this morning one of our mobile sites was bugging out until I added the mobile user agents to the Minify page too. Maybe it was an update with v0.9.2.11 from 5/22 and i just didn’t notice til now?

Leave a Reply