PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Theme with Integrated Mobile support issues

Quick Cache Plugin. Speeds up WordPress®.

Theme with Integrated Mobile support issues

Postby wpweaver » December 7th, 2011, 1:38 pm

I am the author of the Weaver II free WordPress theme. It has bleeding edge mobile device support that so far defies compatibility with any caching plugins. Fortunately, I see a little glimmer of hope with Quick Cache.

Because Weaver's mobile support is so advanced, it is hitting problems that probably have never been encountered before. In summary, the theme can generate up to THIRTEEN different outputs for the same page depending on the device (standard browser, smartphone, iPhone, iPad, Kindle Fire, iOs, Android, etc.) See a description of the full extent of the problem here: http://weavertheme.com/weaver-caching-a ... e-devices/

One of my main goals is to make things no-brainer easy for the users, so ideally I would like a solution to this problem that would not require any action on the part of the user - Weaver II and Quick Cache should work seamlessly without any extra user input. Here are some of the solutions I've thought of.

Ideally, there could be a cache per view (one of the 13 possibilities).

The MD5 Version Salt seems like it should be the solution, but I don't really want the sites to be forced to generate a cache for each and every browser! (e.g. $_SERVER["HTTP_USER_AGENT"]) I also don't think the theme can generate a cookie before the cache is checked.

So I thought I could define a function in the functions.php of my theme with a function called 'weaverii_quickcache()' that could return a unique string for each of the 13 views. But that seems to fail - the quick cache admin generates an error when I specify a function name there. Any idea why? Maybe the theme functions.php is not loaded at plugin admin time? But is there any inherent reason putting a function for the MD5 salt shouldn't work? (It would still not be automatic).

The second idea I had was to mess with the QuickCache settings myself to fill in the list of No-Cache User Agent patterns my theme understands. (I guess I could also provide a copy/paste list to the users, but that is ugly). That would not generate caches for mobile views like the previous solution, but would make the mobile views render correctly. So if we can't figure out the MD5 salt function call, is there any particular reason my theme couldn't mess with the Quick Cache settings to preload agent patterns?

And as an alternative, are there any filters or actions my theme could define that would either generate an alternative MD5 pattern, or disable caching on the fly?

As an aside, I'm going down this path with other cache plugins as well, and Quick Cache seem to be the only one with even a remote chance of solving this issue. I suspect as the importance of mobile devices becomes more apparent, and site developers demand specialized theme support for things like iPads, etc, this issue will become more common.

Thanks for reading this long post. But this is a important, and I suspect growing issue.

And as a final note, you really should check your plugin with WP_DEBUG set to true in wp-config.php as it generates a fairly large number of undefined index errors from both the admin and visitor views when using Quick Cache.

Bruce Wampler
Weaver II Theme
User avatar
wpweaver
Registered User
Registered User
 
Posts: 5
Joined: August 1, 2010

Return to Quick Cache Plugin

Who is online

Users browsing this forum: No registered users and 1 guest