WP Super Cache separate cache for mobile

I’m using the WP Super Cache plugin and inside my theme I have code that executes differently if the site is viewed on a mobile device (iOS, Android) than a desktop browser. How do make WP Super Cache create a separate cache for each, most likely via the user agent?

Right now, I have use mod_rewrite to serve cache, which I believe WP Super Cache will cache the pages as html files to be served. Since the cache is saved from the desktop browser, the mobile browser is seeing that as well. I’d like WP Super Cache to generate two separate caches, one of mobile devices and another for desktop browser. Is this something WP Super Cache can handle or is there a better cache plugin I should be using to make this work?

Thanks!

3 Answers
3

There are several ways to handle mobile devices and doing it inside of single theme is builky and hard to maintain (as for me at least). More commonly this seems to be accomplished with separate templates or separate mobile-specific theme.

I don’t know about WP Super Cache specifics because I hadn’t used it extensively.

Plugin I currently use is W3 Total Cache. It allows you to create groups of user agents strings, for which visitors can be redirected to another theme or domain and (as I understand from description of settings) will have separate versions of cached pages.

Leave a Comment