Looking for WordPress & design information? Check out www.shapeofweb.com for more!
TouchSize

Server StatusServer Status

Viewing Article

Theme caching on mobile

  • 29/11/2016 5:59 PM
  • Articles
  • 185 views
Caching software is used to improve the performance of your website and is an indispensable tool for a WordPress site administrator. However, when you’re serving several versions of a blog to different mobile devices, this becomes problematic. It may give the appearance that your mobile theme is not functioning.You cannot give the same cached version to everyone. You may see:
  • Cached posts and pages using your desktop theme on mobile devices, and/or
  • Cached posts and pages using your mobile theme on desktop devices.
  • Inconsistency of theme when your site is refreshed.
Fortunately, most caching plugins and services may be optimized for mobile use by disabling caching when mobile devices are detected.

W3 Total Cache 

The following instructions should  be performed in the W3 Total Cache settings pages.
  1. If “Browser Cache” enabled, disable "Set expires header" in the Browser Cache settings to prevent desktop/mobile switch link issues.
  2. Go to the “Page Cache” settings under the "Performance" tab.
  3. Scroll down to the “Rejected User Agents” field and paste the list of mobile user agents, adding one per line.
  4. Save your changes.
  5. Go to the “Minify” settings under the Performance tab.
  6. Scroll down to the “Rejected User Agents” field and paste the list of mobile  user agents, adding one per line.
  7. Save your changes.
  8. Go to the “CDN” settings under the Performance tab.
  9. Scroll down to the “Rejected User Agents” field and paste the list of mobile user agents, adding one per line.
  10. Save your changes.
  11. Finally, go to the W3 Total Cache “Dashboard” and select “Empty All Caches”.

WP Super Cache 

Note: In some scenarios, WP Super Cache seems to ignore the settings for rejected user agents.
  1. In the Advanced tab of the WP Super Cache settings select “Mobile Device Support”* and click “Update Status”.
  2. Still in the Advanced tab, scroll down to the “Rejected User Agents” area. Paste the entire list of mobile user agents found below and click “Save UA Strings”.
  3. In the “Contents” tab, click “Delete Expired” and “Delete Cached” to delete pages that were likely cached before adding the new list of rejected user agents.

WP Rocket 
  1. In the "Basic Options" of WP Rocket's settings page, make sure "Enable caching for mobile devices." is deselected. 
  2. In the "Advanced Options" section of the WP Rocket settings, add the user agent list below to the "Never send cache pages for these user agents". Save the changes and clear all caches.

WP Simple Cache

     This plugin is not in active development and does not include options to exclude user agents. Please use a cache plugin in active development.


Hyper Cache
  1. In the "Bypasses" tab, select "Devices (user agents) to bypass"
  2. Add the user agent list below.
  3. Click the "Clean the whole cache" button to remove any previously cached files

 

Print Article  Print Article

Share via   Share by Email   Share via Twitter   Share via Facebook   Share via Google Plus

Related Articles

Comments

Add Comment

Replying To  
Full Name
Email Address     Send Email on Replies

Confirm Submission

Please enter the text from the image in the box provided, this helps us to prevent spam.


Register Now

User Log In

  Remember Me
Forgotten Password?
Note: Your mail address will be automatically registered to our newsletter. How to use the help desk