I have separate caches for mobile and desktop users and my implementation was working properly until my website began experiencing high traffic. Now, randomly my mobile users will see the desktop view of the site. I'm using W3 total cache and nginx. I borrowed heavily from here: https://miteshshah.github.io/linux/nginx/how-to-setup-separate-nginx-fastcgi-cache-for-mobile-and-desktop-users/ but still no luck. Any pointers?

Also, I use wp_is_mobile to insert advertisements after every n-paragraphs in my single posts. The difference between desktop and mobile is that I use different "n" value for desktop and mobile users.


  • Something to note: the code works properly 100% of the time when I'm logged into wordpress, but when I log off it doesn't. – Louis Nadops Jul 6 '18 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.