I am trying to configure User Agent Groups to cache the following setup…
I have a single complex theme which displays content for both desktop and mobile. While most of the mobile styling is handled by CSS there are a few places where I detect mobile in PHP and customise content accordingly.
If I enable W3 Total Cache Page Caching, it sometimes caches a mobile version of a page and sometimes a desktop version depending on the device a user is using when the page cache expires and needs to be refreshed.
So I figured I needed to use User Agent Groups to cache two versions (or potentially 3; desktop, tablet, mobile, if I server different content to an ipad also).
However, if I enable a User Agent Group and set the theme to the same as my main theme – remember, my main theme serves different content for mobile and desktop – this doesn’t seem to work, I still sometimes get a desktop device showing a cached mobile version.
Also, if I try to enable 2 User Agent Groups with the same theme, it prevents me from doing so.
Are the User Agent Group caches created with the theme or the group name as an identifier? I would expect them to use the group name so you could potential have 3 different caches of the same theme?
- The topic ‘[Plugin: W3 Total Cache] Caching User Agent Groups and Themes – will this work?’ is closed to new replies.