It’s not news, when you have a caching plugin like W3 Total Cache and you are trying to use a mobile site separate from your desktop theme it can be impossible for most. You get problems like the desktop theme displaying on mobile or the mobile theme displaying on desktop and this will seriously affect user experience. So, do you own a WordPress blog where you have a great desktop theme but still want to cater for the needs of your mobile users without having to change your theme or forego your caching and ruin your site speed? You have come to the right place.
For many reasons, it is hard to let go of caching, especially because of how much optimization some of these caching plugins help you get out of the way. So how can you cache without displaying the wrong theme for the wrong device every time? Simple.
You must already have a mobile switcher plugin of course, except your mobile theme in itself is a plugin then you don’t need one. But if it isn’t we recommend using Any Mobile Theme Switcher. Definitely the best out there so far. Now you have both themes you want displaying for mobile devices and desktop all set up but they keep interfering with each other because of your caching. How do you fix this? Simple! Rejected User Agents .
How It Works
The rejected user agents feature helps you instruct your caching plugin (in this case W3TC) not to display cached pages for certain devices. So how do you get a list of user agents you should use for this? Easy! We have personally compiled a list of user agents that will absolutely have your mobile site displaying properly!
You can checkout our list of user agents you need and copy paste them by following the steps below:
Step 1- Visit THIS PAGE and copy the list of rejected user agents.
Step 2- head over to your WordPress back-end to Perfromance > Page Cache > Advanced > Rejected User agents.
Step 3- Paste the list you have just copied and save all settings.
Step 4- Test your website from any mobile device.
You will be happy to learn this is the best way to stop mobile devices from loading cached versions of your desktop site without turning off caching. In fact it is most probably the only way.
If you have any questions please leave a comment below.
thequickwayto.com is a participant in the Amazon Services LLC Associates Program, and we get a commission on purchases made through our links.