Note: as of Blocksy 1.7.11 this document is deprecated — the Header Builder implementation no longer interferes with caching plugins.
Blocksy’s Header Builder uses two totally separated views for desktop and mobile devices — thus allowing for a greater flexibility. In order to support this, we have to detect which device the user is using for accessing the site. This check is done by looking into the User Agent header of the request, and that’s where issues can start to pop in. It works without any problems on sites that do not have caching enabled, but everyone usually needs that for speed improvements.
For a plugin/caching solution to work properly with our Header Builder, it needs to have support for branching caching on user agents or specifically for WordPress’s
is_mobile() function. A lot of WordPress-focused cache plugins do have this in place but some not.
The proper fix for this would be to enable User Agent Groups matching in your caching solution. Next, we will list how to enable this for most popular cache plugins/solutions:
W3 Total Cache
- Go to Performance -> User Agent Groups
- You will see two groups created by default tables and phones. Click the checkboxes for both of them in order to enabling caching based on these values.
- Click Save Settings & Purge Caches
WP Super Cache
- Go to Settings -> WP Super Cache -> Advanced Tab
- Enable the Mobile device support checkbox
- Remove all the existing caches for the plugin
- Go to LiteSpeed Cache -> Cache
- Enable the Cache Mobile option (Press the ON button)
- Purge all the existing caches so that everything gets rebuilt
- Go to Tools -> Swift Performance
- Go to the Caching->General tab of their settings
- Enable the Separate Mobile Device Cache setting.
- Scroll up and click the SAVE CHANGES button. When asked if you want to clear the caches, click the Clear cache button.
WP Fastest Cache
- Go to WP Fastest Cache options panel
- If you don’t have the Premium version of the plugin — enable Mobile option
- If you have the Premium version, though, it’s better to disable the Mobile option and enable Mobile Theme
- Scroll down and click the Submit button to save the changes. Also make sure to click the Delete Cache button.
The situation with the Cache Enabler plugin is a bit more sad, unfortunately. This plugin doesn’t provide support for user agents grouping at all. When they detect a theme or a plugin that has such behaviour — they simply disable their caching at all when they detect a plugin/theme that uses this technique. Blocksy theme doesn’t bypass their cache for now, in hopes that they will fix it. In order to get proper caching and a functioning header you will have to use another caching solution that support the
wp_is_mobile() call, like WP Super Cache.
Another option is to manually disable all of the Cache Enabler cache’s, but then with that in place there’s no reason to keep the plugin around. That can be done by using this filter:
Again, keep in mind that this will disable all of the caching, turning the plugin useless.
For advanced users: There is a way to get Cache Enabler to work with
wp_is_mobile() function, but this involves editing plugin files, which will break the updates for it. More details can be seen in this thread.
This post is constantly updated with listings for new caching plugins. Please write to our support in case your’s missing from this article.